On Wed, 2021-09-29 at 19:17 +1000, Alistair Leslie-Hughes wrote:
diff --git a/dlls/wininet/http.c b/dlls/wininet/http.c index e9363208471..b2862ead789 100644 --- a/dlls/wininet/http.c +++ b/dlls/wininet/http.c @@ -2918,7 +2918,10 @@ static DWORD set_content_length(http_request_t *request) WCHAR encoding[20]; DWORD size;
- if(request->status_code == HTTP_STATUS_NO_CONTENT || !wcscmp(request->verb, L"HEAD")) {
- if(request->status_code == HTTP_STATUS_NO_CONTENT || request->status_code == HTTP_STATUS_NOT_MODIFIED ||
!wcscmp(request->verb, L"HEAD"))
- {
request->read_size = 0;
request->contentLength = request->netconn_stream.content_length = 0; return ERROR_SUCCESS;
This is still not correct. I've added some tests on top of yours that check these responses, with and without Content-Length header.