Commit 0ff1b0c3 authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

mshtml: Set referer HTTP header in nsIHttpChannel::SetReferrerWithPolicy.

parent 3cb45c4c
......@@ -1303,7 +1303,11 @@ static nsresult NSAPI nsChannel_SetReferrerWithPolicy(nsIHttpChannel *iface, nsI
nsChannel *This = impl_from_nsIHttpChannel(iface);
DWORD channel_scheme, referrer_scheme;
nsWineURI *referrer;
BSTR referrer_uri;
nsresult nsres;
HRESULT hres;
static const WCHAR refererW[] = {'R','e','f','e','r','e','r'};
TRACE("(%p)->(%p %d)\n", This, aReferrer, aReferrerPolicy);
......@@ -1338,6 +1342,10 @@ static nsresult NSAPI nsChannel_SetReferrerWithPolicy(nsIHttpChannel *iface, nsI
return NS_OK;
}
hres = IUri_GetDisplayUri(referrer->uri, &referrer_uri);
if(SUCCEEDED(hres) )
set_http_header(&This->request_headers, refererW, sizeof(refererW)/sizeof(WCHAR), referrer_uri, SysStringLen(referrer_uri));
This->referrer = (nsIURI*)&referrer->nsIFileURL_iface;
return NS_OK;
}
......
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