diff --git a/extensions/xmlextras/base/src/nsXMLHttpRequest.cpp b/extensions/xmlextras/base/src/nsXMLHttpRequest.cpp index e4467372c05..46600f8e068 100644 --- a/extensions/xmlextras/base/src/nsXMLHttpRequest.cpp +++ b/extensions/xmlextras/base/src/nsXMLHttpRequest.cpp @@ -1506,6 +1506,13 @@ nsXMLHttpRequest::Send(nsIVariant *aBody) if (httpChannel) { httpChannel->SetRequestMethod(method); } + + // Bypass the network cache since there is no way for us to ever reuse + // a POST response. This avoids wasting space in the cache. + nsLoadFlags flags; + mChannel->GetLoadFlags(&flags); + flags |= nsIRequest::LOAD_BYPASS_CACHE | nsIRequest::INHIBIT_CACHING; + mChannel->SetLoadFlags(flags); } }