mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1199049 - Part 5: Preserve the CORS preflight information when setting up a replacement channel; r=jduell
This commit is contained in:
parent
f4d86bb92e
commit
3f418f5be8
@ -2335,6 +2335,16 @@ HttpBaseChannel::SetupReplacementChannel(nsIURI *newURI,
|
||||
if (!httpChannel)
|
||||
return NS_OK; // no other options to set
|
||||
|
||||
// Preserve the CORS preflight information.
|
||||
nsCOMPtr<nsIHttpChannelInternal> httpInternal = do_QueryInterface(newChannel);
|
||||
if (mRequireCORSPreflight && httpInternal) {
|
||||
rv = httpInternal->SetCorsPreflightParameters(mUnsafeHeaders, mWithCredentials,
|
||||
mPreflightPrincipal);
|
||||
if (NS_WARN_IF(NS_FAILED(rv))) {
|
||||
return rv;
|
||||
}
|
||||
}
|
||||
|
||||
if (preserveMethod) {
|
||||
nsCOMPtr<nsIUploadChannel> uploadChannel =
|
||||
do_QueryInterface(httpChannel);
|
||||
@ -2404,7 +2414,6 @@ HttpBaseChannel::SetupReplacementChannel(nsIURI *newURI,
|
||||
}
|
||||
}
|
||||
|
||||
nsCOMPtr<nsIHttpChannelInternal> httpInternal = do_QueryInterface(newChannel);
|
||||
if (httpInternal) {
|
||||
// Convey third party cookie and spdy flags.
|
||||
httpInternal->SetThirdPartyFlags(mThirdPartyFlags);
|
||||
|
Loading…
Reference in New Issue
Block a user