forked from chromium/chromium
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Release the cache entry on deferred redirect.
If a redirect is deferred in the warm cache case, the HTTP transaction currently doesn't release the cache entry until after the redirect continues. This prevents other requests from accessing the cache entry. Reuse the DoneReading() signal for the URLRequestJob to notify the transaction that the response body is to be discarded. This matches the redirect-specific logic in HttpCache::Transaction which does not cache redirect bodies. In addition, now that this signal exists at a higher level, remove that logic in HttpCache::Transaction. It is now the caller's job to decide which response bodies are and aren't truncated away. Fixup and add new tests for this behavior. BUG=292879 TEST=HttpCache.CachedRedirect, HttpCache.DoneReading, URLRequestJob.RedirectTransactionNotifiedWhenDone Review URL: https://chromiumcodereview.appspot.com/23710059 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@224161 0039d316-1c4b-4281-b951-d872f2087c98
- Loading branch information
davidben@chromium.org
committed
Sep 19, 2013
1 parent
c3bd297
commit 5b2bacc
Showing
7 changed files
with
97 additions
and
9 deletions.
There are no files selected for viewing
1 change: 1 addition & 0 deletions
1
net/data/url_request_unittest/redirect-test.html.mock-http-headers
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
HTTP/1.1 302 Redirect | ||
Location: with-headers.html | ||
Cache-Control: max-age=10000 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters