Bug 1293765 - Don't release upload stream in HTTP channel until authentication loop is done. r=valentin

This commit is contained in:
Honza Bambas 2016-08-17 07:08:00 -04:00
Родитель a2072b8e93
Коммит 70d3208f45
1 изменённых файлов: 8 добавлений и 1 удалений

Просмотреть файл

@ -6346,7 +6346,14 @@ nsHttpChannel::OnStopRequest(nsIRequest *request, nsISupports *ctxt, nsresult st
MOZ_ASSERT(NS_IsMainThread(),
"OnStopRequest should only be called from the main thread");
if (!mAuthRetryPending) {
// We must not release the upload stream (that may contain POST data)
// before we finish any authentication loops happing during lifetime
// of this very channel. Otherwise, we may loose the upload data when
// authenticating to e.g. an NTLM authenticated site.
LOG((" dropping upload stream"));
mUploadStream = nullptr;
}
if (NS_FAILED(status)) {
ProcessSecurityReport(status);