summaryrefslogtreecommitdiff
path: root/dom/fetch/InternalResponse.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'dom/fetch/InternalResponse.cpp')
-rw-r--r--dom/fetch/InternalResponse.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/dom/fetch/InternalResponse.cpp b/dom/fetch/InternalResponse.cpp
index d99df3d7dc..ec32c4e216 100644
--- a/dom/fetch/InternalResponse.cpp
+++ b/dom/fetch/InternalResponse.cpp
@@ -17,12 +17,15 @@
namespace mozilla {
namespace dom {
-InternalResponse::InternalResponse(uint16_t aStatus, const nsACString& aStatusText)
+InternalResponse::InternalResponse(uint16_t aStatus,
+ const nsACString& aStatusText,
+ RequestCredentials aCredentialsMode)
: mType(ResponseType::Default)
, mStatus(aStatus)
, mStatusText(aStatusText)
, mHeaders(new InternalHeaders(HeadersGuardEnum::Response))
, mBodySize(UNKNOWN_BODY_SIZE)
+ , mCredentialsMode(aCredentialsMode)
{
}
@@ -183,7 +186,7 @@ InternalResponse::CORSResponse()
MOZ_ASSERT(!mWrappedResponse, "Can't CORSResponse a already wrapped response");
RefPtr<InternalResponse> cors = CreateIncompleteCopy();
cors->mType = ResponseType::Cors;
- cors->mHeaders = InternalHeaders::CORSHeaders(Headers());
+ cors->mHeaders = InternalHeaders::CORSHeaders(Headers(), mCredentialsMode);
cors->mWrappedResponse = this;
return cors.forget();
}