mshtml: Set referer HTTP header in nsIHttpChannel::SetReferrerWithPolicy.
Signed-off-by: Jacek Caban <jacek@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
3cb45c4c8d
commit
0ff1b0c382
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue