winhttp: Status HTTP_STATUS_SWITCH_PROTOCOLS doesn't have any content.

Signed-off-by: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Signed-off-by: Hans Leidekker <hans@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Alistair Leslie-Hughes 2020-06-17 11:53:40 +02:00 committed by Alexandre Julliard
parent 6b6a7124a6
commit a6de059eef
1 changed files with 4 additions and 1 deletions

View File

@ -2353,8 +2353,11 @@ static void set_content_length( struct request *request, DWORD status )
WCHAR encoding[20];
DWORD buflen = sizeof(request->content_length);
if (status == HTTP_STATUS_NO_CONTENT || status == HTTP_STATUS_NOT_MODIFIED || !wcscmp( request->verb, L"HEAD" ))
if (status == HTTP_STATUS_NO_CONTENT || status == HTTP_STATUS_NOT_MODIFIED ||
status == HTTP_STATUS_SWITCH_PROTOCOLS || !wcscmp( request->verb, L"HEAD" ))
{
request->content_length = 0;
}
else
{
if (query_headers( request, WINHTTP_QUERY_CONTENT_LENGTH|WINHTTP_QUERY_FLAG_NUMBER,