Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(402)

Issue 6588105: Http cache: Fix handling of truncated entries.... (Closed)

Created:
9 years, 9 months ago by rvargas (doing something else)
Modified:
9 years, 6 months ago
Reviewers:
eroman
CC:
chromium-reviews, cbentzel+watch_chromium.org, darin-cc_chromium.org, Paweł Hajdan Jr.
Visibility:
Public.

Description

Http cache: Fix handling of truncated entries. - Always validate a truncated entry. Furthermore, given that a server can say not-modified (304), followed by 200 when actually asked for the final range, now we validate truncated entries by asking for the next byte that we need. - If a server refuses to serve a byte range and instead sends the whole resource, we just cache the response as if nothing was stored before. - If we receive a network error while reading from the net, we don't discard the cached entry right away. Now we wait until the transaction is closed, and attempt to mark the entry as truncated. BUG=48468 TEST=net_unittests Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=76560

Patch Set 1 #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+194 lines, -120 lines) Patch
M net/http/http_cache_transaction.cc View 4 chunks +27 lines, -1 line 1 comment Download
M net/http/http_cache_unittest.cc View 11 chunks +142 lines, -107 lines 0 comments Download
M net/http/partial_data.h View 3 chunks +6 lines, -0 lines 0 comments Download
M net/http/partial_data.cc View 5 chunks +19 lines, -12 lines 0 comments Download

Messages

Total messages: 2 (0 generated)
rvargas (doing something else)
9 years, 9 months ago (2011-03-02 00:50:27 UTC) #1
eroman
9 years, 9 months ago (2011-03-02 02:06:04 UTC) #2
LGTM.

I didn't fully understand this change, but it looks good.

http://codereview.chromium.org/6588105/diff/1/net/http/http_cache_transaction.cc
File net/http/http_cache_transaction.cc (right):

http://codereview.chromium.org/6588105/diff/1/net/http/http_cache_transaction...
net/http/http_cache_transaction.cc:992: // We just finishing the validation of a
truncated entry, and the server
wording nit: "finishing" --> "finished".

Powered by Google App Engine
This is Rietveld 408576698