| Index: src/DefaultWebRequestWinInet.cpp |
| =================================================================== |
| --- a/src/DefaultWebRequestWinInet.cpp |
| +++ b/src/DefaultWebRequestWinInet.cpp |
| @@ -283,7 +283,13 @@ |
| result.status = WindowsErrorToGeckoError(GetLastError()); |
| return result; |
| } |
| - // TODO: Make sure for HTTP 1.1 "Accept-Encoding: gzip, deflate" doesn't HAVE to be set here |
| + HTTP_VERSION_INFO ver; |
| + DWORD l = sizeof(ver); |
| + WinHttpQueryOption(NULL, WINHTTP_OPTION_HTTP_VERSION, (void*)&ver, &l); |
|
Wladimir Palant
2013/09/04 07:21:25
Nit: explicit conversion to void* is unnecessary I
|
| + if (ver.dwMinorVersion == 1) |
|
Oleksandr
2013/09/03 11:49:41
No compression for IE6 (HTTP 1.0)
Wladimir Palant
2013/09/04 07:21:25
I don't like hardcoding the expectation here that
|
| + { |
| + headers += L"Accept-Encoding: gzip, deflate\r\n"; |
| + } |
| if (headers.length() > 0) |
| { |
| res = ::WinHttpSendRequest(hRequest, headers.c_str(), headers.length(), WINHTTP_NO_REQUEST_DATA, 0, 0, 0); |