From d2fe19f12aefc1c08a4d375eb92e7241d897a852 Mon Sep 17 00:00:00 2001 From: "L. David Baron" Date: Thu, 20 Aug 2009 12:22:30 -0700 Subject: [PATCH] Backed out changeset 3a829715fd39 (Bug 482935) on suspicion of causing mochitest-plain leaks. --- content/base/test/Makefile.in | 2 - content/base/test/bug482935.sjs | 12 -- content/base/test/test_bug482935.html | 121 -------------------- netwerk/protocol/http/src/nsHttpChannel.cpp | 7 +- 4 files changed, 1 insertion(+), 141 deletions(-) delete mode 100644 content/base/test/bug482935.sjs delete mode 100644 content/base/test/test_bug482935.html diff --git a/content/base/test/Makefile.in b/content/base/test/Makefile.in index e0b6c3d25b7..a5bc5e6fef2 100644 --- a/content/base/test/Makefile.in +++ b/content/base/test/Makefile.in @@ -324,8 +324,6 @@ _TEST_FILES = test_bug5141.html \ bug466409-page.html \ bug466409-empty.css \ test_bug466409.html \ - test_bug482935.html \ - bug482935.sjs \ test_classList.html \ $(NULL) # Disabled; see bug 492181 diff --git a/content/base/test/bug482935.sjs b/content/base/test/bug482935.sjs deleted file mode 100644 index 9d20eab0f19..00000000000 --- a/content/base/test/bug482935.sjs +++ /dev/null @@ -1,12 +0,0 @@ -function handleRequest(request, response) { - var body="initial"; - - try { - body = request.getHeader("X-Request"); - } catch(e) { - body="request.getHeader() failed! Exception: " + e; - } - - response.setHeader("Cache-Control", "max-age=3600"); - response.bodyOutputStream.write(body, body.length); -} diff --git a/content/base/test/test_bug482935.html b/content/base/test/test_bug482935.html deleted file mode 100644 index 89c3e103900..00000000000 --- a/content/base/test/test_bug482935.html +++ /dev/null @@ -1,121 +0,0 @@ - - - - Test bug 482935 - - - - - - - - diff --git a/netwerk/protocol/http/src/nsHttpChannel.cpp b/netwerk/protocol/http/src/nsHttpChannel.cpp index ddd363e5bce..87c4aadf6be 100644 --- a/netwerk/protocol/http/src/nsHttpChannel.cpp +++ b/netwerk/protocol/http/src/nsHttpChannel.cpp @@ -5124,11 +5124,6 @@ nsHttpChannel::OnStopRequest(nsIRequest *request, nsISupports *ctxt, nsresult st LOG(("nsHttpChannel::OnStopRequest [this=%x request=%x status=%x]\n", this, request, status)); - // allow content to be cached if it was loaded successfully (bug #482935) - PRBool contentComplete = PR_FALSE; - if (NS_SUCCEEDED(status)) - contentComplete = PR_TRUE; - // honor the cancelation status even if the underlying transaction completed. if (mCanceled || NS_FAILED(mStatus)) status = mStatus; @@ -5219,7 +5214,7 @@ nsHttpChannel::OnStopRequest(nsIRequest *request, nsISupports *ctxt, nsresult st } if (mCacheEntry) - CloseCacheEntry(!contentComplete); + CloseCacheEntry(PR_TRUE); if (mOfflineCacheEntry) CloseOfflineCacheEntry();