Commit f6bfc309 authored by Nikolay Sivov's avatar Nikolay Sivov Committed by Alexandre Julliard

msxml3: Clear request headers on Open().

parent 4ab21edf
......@@ -176,6 +176,19 @@ static void free_response_headers(httprequest *This)
This->raw_respheaders = NULL;
}
static void free_request_headers(httprequest *This)
{
struct httpheader *header, *header2;
LIST_FOR_EACH_ENTRY_SAFE(header, header2, &This->reqheaders, struct httpheader, entry)
{
list_remove(&header->entry);
SysFreeString(header->header);
SysFreeString(header->value);
heap_free(header);
}
}
struct BindStatusCallback
{
IBindStatusCallback IBindStatusCallback_iface;
......@@ -888,6 +901,7 @@ static HRESULT httprequest_open(httprequest *This, BSTR method, BSTR url,
SysFreeString(This->user);
SysFreeString(This->password);
This->user = This->password = NULL;
free_request_headers(This);
if (!strcmpiW(method, MethodGetW))
{
......@@ -1273,8 +1287,6 @@ static HRESULT httprequest_put_onreadystatechange(httprequest *This, IDispatch *
static void httprequest_release(httprequest *This)
{
struct httpheader *header, *header2;
if (This->site)
IUnknown_Release( This->site );
if (This->uri)
......@@ -1286,15 +1298,8 @@ static void httprequest_release(httprequest *This)
SysFreeString(This->user);
SysFreeString(This->password);
/* request headers */
LIST_FOR_EACH_ENTRY_SAFE(header, header2, &This->reqheaders, struct httpheader, entry)
{
list_remove(&header->entry);
SysFreeString(header->header);
SysFreeString(header->value);
heap_free(header);
}
/* response headers */
/* cleanup headers lists */
free_request_headers(This);
free_response_headers(This);
SysFreeString(This->status_text);
......
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