Commit ebc4fd14 authored by Hans Leidekker's avatar Hans Leidekker Committed by Alexandre Julliard

winhttp: Don't attempt to read data after receiving a response to a HEAD request.

parent 07ed66f8
......@@ -2815,7 +2815,11 @@ static HRESULT request_receive( struct winhttp_request *request )
return HRESULT_FROM_WIN32( get_last_error() );
}
if ((err = wait_for_completion( request ))) return HRESULT_FROM_WIN32( err );
if (!strcmpW( request->verb, headW ))
{
request->state = REQUEST_STATE_RESPONSE_RECEIVED;
return S_OK;
}
if (!(request->buffer = heap_alloc( buflen ))) return E_OUTOFMEMORY;
request->buffer[0] = 0;
size = total_bytes_read = 0;
......
......@@ -46,6 +46,7 @@
static const WCHAR getW[] = {'G','E','T',0};
static const WCHAR postW[] = {'P','O','S','T',0};
static const WCHAR headW[] = {'H','E','A','D',0};
static const WCHAR slashW[] = {'/',0};
static const WCHAR http1_0[] = {'H','T','T','P','/','1','.','0',0};
static const WCHAR http1_1[] = {'H','T','T','P','/','1','.','1',0};
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment