зеркало из https://github.com/mozilla/pjs.git
Fixing bug 268844. Don't force the cache to be bypassed for non-multipart requests. r=bzbarsky@mit.edu, sr=darin@meer.net
This commit is contained in:
Родитель
471617b8f8
Коммит
bcd4e3ee61
|
@ -1525,16 +1525,17 @@ nsXMLHttpRequest::Send(nsIVariant *aBody)
|
||||||
if (!listener) {
|
if (!listener) {
|
||||||
return NS_ERROR_OUT_OF_MEMORY;
|
return NS_ERROR_OUT_OF_MEMORY;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Bypass the network cache since caching makes no sense with
|
||||||
|
// multipart mixed replace documents.
|
||||||
|
nsLoadFlags flags;
|
||||||
|
mChannel->GetLoadFlags(&flags);
|
||||||
|
flags |= nsIRequest::LOAD_BYPASS_CACHE | nsIRequest::INHIBIT_CACHING;
|
||||||
|
mChannel->SetLoadFlags(flags);
|
||||||
} else {
|
} else {
|
||||||
listener = this;
|
listener = this;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Bypass the network cache.
|
|
||||||
nsLoadFlags flags;
|
|
||||||
mChannel->GetLoadFlags(&flags);
|
|
||||||
flags |= nsIRequest::LOAD_BYPASS_CACHE | nsIRequest::INHIBIT_CACHING;
|
|
||||||
mChannel->SetLoadFlags(flags);
|
|
||||||
|
|
||||||
// Start reading from the channel
|
// Start reading from the channel
|
||||||
ChangeState(XML_HTTP_REQUEST_SENT);
|
ChangeState(XML_HTTP_REQUEST_SENT);
|
||||||
rv = mChannel->AsyncOpen(listener, nsnull);
|
rv = mChannel->AsyncOpen(listener, nsnull);
|
||||||
|
|
Загрузка…
Ссылка в новой задаче