https://bugs.winehq.org/show_bug.cgi?id=37023
--- Comment #5 from Andreas Fuchs anduchs@gmail.com ---
I am not sure about the fix, a better method would be to set request->content_length to zero when no answer is expected, like:
--- snip --- diff --git a/dlls/winhttp/request.c b/dlls/winhttp/request.c index d497d7a..c07e663 100644 --- a/dlls/winhttp/request.c +++ b/dlls/winhttp/request.c @@ -1806,2 +1806,3 @@ static DWORD set_content_length( request_t *request ) {
- static const WCHAR headW[] = {'H','E','A','D',0}; WCHAR encoding[20];
@@ -1823,2 +1824,10 @@ static DWORD set_content_length( request_t *request ) }
- /* For a HEAD request we never expect any content */
- if (request->verb && !strcmpiW(request->verb, headW))
- {
request->content_length = 0;
request->read_chunked = FALSE;
- }
- request->content_read = 0;
--- snip ---
Looking at this patch I'm sceptical. One of the points about a head-request is, that the server's answer will contain a content_length field. So I'm not sure, what wine's winhttp returns when being asked for the content_length. I _guess_ WinHttpQueryHeaders() is not a problem. Are there other ways that the content_length-field will be accessed by the application ?