diff --git a/extensions/xmlextras/base/src/nsXMLHttpRequest.cpp b/extensions/xmlextras/base/src/nsXMLHttpRequest.cpp index f80e296e8a7..00a9657cf50 100644 --- a/extensions/xmlextras/base/src/nsXMLHttpRequest.cpp +++ b/extensions/xmlextras/base/src/nsXMLHttpRequest.cpp @@ -1525,16 +1525,17 @@ nsXMLHttpRequest::Send(nsIVariant *aBody) if (!listener) { 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 { 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 ChangeState(XML_HTTP_REQUEST_SENT); rv = mChannel->AsyncOpen(listener, nsnull);