зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1217501 P4 Fill headers before setting guard when reading response from Cache. r=ehsan
This commit is contained in:
Родитель
ff9ecfcefa
Коммит
26038d4a37
|
@ -349,11 +349,15 @@ TypeUtils::ToInternalRequest(const CacheRequest& aIn)
|
|||
RefPtr<InternalHeaders> internalHeaders =
|
||||
ToInternalHeaders(aIn.headers(), aIn.headersGuard());
|
||||
ErrorResult result;
|
||||
internalRequest->Headers()->SetGuard(aIn.headersGuard(), result);
|
||||
MOZ_ASSERT(!result.Failed());
|
||||
|
||||
// Be careful to fill the headers before setting the guard in order to
|
||||
// correctly re-create the original headers.
|
||||
internalRequest->Headers()->Fill(*internalHeaders, result);
|
||||
MOZ_ASSERT(!result.Failed());
|
||||
|
||||
internalRequest->Headers()->SetGuard(aIn.headersGuard(), result);
|
||||
MOZ_ASSERT(!result.Failed());
|
||||
|
||||
nsCOMPtr<nsIInputStream> stream = ReadStream::Create(aIn.body());
|
||||
|
||||
internalRequest->SetBody(stream);
|
||||
|
|
Загрузка…
Ссылка в новой задаче