From 3b052877e46c7ae7cbedfd8f71ea58b691504dc8 Mon Sep 17 00:00:00 2001 From: Dmitry Timoshkov Date: Thu, 3 Jun 2021 17:01:06 +0300 Subject: [PATCH] wininet: Reset buffer size before each call to HTTP_HttpQueryInfoW. Otherwise when headers contain multiple entries like WWW-Authenticate: Negotiate WWW-Authenticate: Basic realm="SAMPLE.COM" then 2nd query fails because buffer size is shorter than the header value. Signed-off-by: Dmitry Timoshkov Signed-off-by: Alexandre Julliard --- dlls/wininet/http.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/dlls/wininet/http.c b/dlls/wininet/http.c index c770c312ba9..eedb210cd23 100644 --- a/dlls/wininet/http.c +++ b/dlls/wininet/http.c @@ -5125,6 +5125,8 @@ static DWORD HTTP_HttpSendRequestW(http_request_t *request, LPCWSTR lpszHeaders, loop_next = TRUE; break; } + + dwBufferSize = 2048; } heap_free( host ); @@ -5153,6 +5155,8 @@ static DWORD HTTP_HttpSendRequestW(http_request_t *request, LPCWSTR lpszHeaders, loop_next = TRUE; break; } + + dwBufferSize = 2048; } if(!loop_next) {