Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 9 additions & 3 deletions source/Client/BugTrapUI.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -778,7 +778,7 @@ static DWORD HTTPSendReport(PCTSTR pszSupportUrl, CTransferThreadParams* pTransf
urlComponents.dwUrlPathLength = countof(szUrlPath);
if (InternetCrackUrl(pszSupportUrl, 0, ICU_DECODE | ICU_ESCAPE, &urlComponents))
{
if (urlComponents.nScheme == INTERNET_SCHEME_HTTP)
if (urlComponents.nScheme == INTERNET_SCHEME_HTTP || urlComponents.nScheme == INTERNET_SCHEME_HTTPS)
{
#ifdef _DEBUG
OutputDebugString(_T("InternetOpen()\n"));
Expand All @@ -802,7 +802,10 @@ static DWORD HTTPSendReport(PCTSTR pszSupportUrl, CTransferThreadParams* pTransf
#ifdef _DEBUG
OutputDebugString(_T("HttpOpenRequest()\n"));
#endif
HINTERNET hRequest = HttpOpenRequest(hConnection, _T("POST"), szUrlPath, NULL, NULL, NULL, INTERNET_FLAG_DONT_CACHE | INTERNET_FLAG_NO_UI, (DWORD_PTR)pTransferThreadParams);
DWORD dwFlags = INTERNET_FLAG_DONT_CACHE | INTERNET_FLAG_NO_UI;
if (urlComponents.nScheme == INTERNET_SCHEME_HTTPS)
dwFlags |= INTERNET_FLAG_SECURE;
HINTERNET hRequest = HttpOpenRequest(hConnection, _T("POST"), szUrlPath, NULL, NULL, NULL, dwFlags, (DWORD_PTR)pTransferThreadParams);
if (hRequest)
{
CMemStream MemStream(4 * 1024);
Expand Down Expand Up @@ -1049,7 +1052,10 @@ static UINT CALLBACK TransferThreadProc(PVOID pParam)
{
static const TCHAR szHttpPrefix[] = _T("http://");
static const size_t nHttpPrefixLength = countof(szHttpPrefix) - 1;
if (_tcsnicmp(g_szSupportHost, szHttpPrefix, nHttpPrefixLength) == 0)
static const TCHAR szHttpsPrefix[] = _T("https://");
static const size_t nHttpsPrefixLength = countof(szHttpsPrefix) - 1;
if (_tcsnicmp(g_szSupportHost, szHttpPrefix, nHttpPrefixLength) == 0
|| _tcsnicmp(g_szSupportHost, szHttpsPrefix, nHttpsPrefixLength) == 0)
dwErrorCode = HTTPSendReport(g_szSupportHost, pTransferThreadParams);
else
dwErrorCode = WSASendReport(g_szSupportHost, pTransferThreadParams);
Expand Down