|
|
Created:
6 years, 2 months ago by rvargas (doing something else) Modified:
6 years, 2 months ago CC:
chromium-reviews, cbentzel+watch_chromium.org, gavinp+disk_chromium.org Base URL:
https://chromium.googlesource.com/chromium/src.git@master Project:
chromium Visibility:
Public. |
DescriptionHttp cache: Fix DCHECK with POSTs and a disabled cache.
Make sure that we don't update the cache after a POST if the cache is
disabled.
BUG=426059
TEST=net_unittests
R=derekjchow@chromium.org, davidben@chromium.org
Committed: https://crrev.com/8e4b4b6ae451720d637556433099a68dab46d4ee
Cr-Commit-Position: refs/heads/master@{#300950}
Patch Set 1 #
Total comments: 4
Patch Set 2 : Add comment #
Messages
Total messages: 23 (11 generated)
The CQ bit was checked by derekjchow@chromium.org
The CQ bit was unchecked by derekjchow@chromium.org
The CQ bit was checked by derekjchow@chromium.org
The CQ bit was unchecked by derekjchow@chromium.org
The CQ bit was checked by derekjchow@chromium.org
The CQ bit was unchecked by derekjchow@chromium.org
On 2014/10/22 22:00:55, rvargas wrote: LGTM
The CQ bit was checked by rvargas@chromium.org
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/672773002/1
The CQ bit was unchecked by commit-bot@chromium.org
No LGTM from a valid reviewer yet. Only full committers are accepted. Even if an LGTM may have been provided, it was from a non-committer or a provisional committer, _not_ a full super star committer. See http://www.chromium.org/getting-involved/become-a-committer Note that this has nothing to do with OWNERS files.
rvargas@chromium.org changed reviewers: + davidben@google.com
+David
davidben@chromium.org changed reviewers: + davidben@chromium.org
https://codereview.chromium.org/672773002/diff/1/net/http/http_cache_transact... File net/http/http_cache_transaction.cc (right): https://codereview.chromium.org/672773002/diff/1/net/http/http_cache_transact... net/http/http_cache_transaction.cc:1222: if (!(effective_load_flags_ & LOAD_DISABLE_CACHE) && Should this be mode_ != NONE or mode_ & WRITE or something of the sort? It looks like LOAD_DISABLE_CACHE figures into ShouldPassThrough() which then controls mode_.
https://codereview.chromium.org/672773002/diff/1/net/http/http_cache_transact... File net/http/http_cache_transaction.cc (right): https://codereview.chromium.org/672773002/diff/1/net/http/http_cache_transact... net/http/http_cache_transaction.cc:1222: if (!(effective_load_flags_ & LOAD_DISABLE_CACHE) && On 2014/10/23 19:14:43, David Benjamin wrote: > Should this be mode_ != NONE or mode_ & WRITE or something of the sort? It looks > like LOAD_DISABLE_CACHE figures into ShouldPassThrough() which then controls > mode_. There are multiple causes for mode_ to change between ShouldPassThrough() and this point. What this line is saying is "unless the conditions when request was made indicated that this should not affect the cache at all, we should invalidate any cached entry at this point"
lgtm https://codereview.chromium.org/672773002/diff/1/net/http/http_cache_transact... File net/http/http_cache_transaction.cc (right): https://codereview.chromium.org/672773002/diff/1/net/http/http_cache_transact... net/http/http_cache_transaction.cc:1222: if (!(effective_load_flags_ & LOAD_DISABLE_CACHE) && On 2014/10/23 19:36:09, rvargas wrote: > On 2014/10/23 19:14:43, David Benjamin wrote: > > Should this be mode_ != NONE or mode_ & WRITE or something of the sort? It > looks > > like LOAD_DISABLE_CACHE figures into ShouldPassThrough() which then controls > > mode_. > > There are multiple causes for mode_ to change between ShouldPassThrough() and > this point. What this line is saying is "unless the conditions when request was > made indicated that this should not affect the cache at all, we should > invalidate any cached entry at this point" Ohh, I see. This is about invalidating GETs after a successful POST, not something about a cache entry attached to the current request or so. Perhaps it's worth a comment above 1222 so it's clearer what this block is doing?
thanks https://codereview.chromium.org/672773002/diff/1/net/http/http_cache_transact... File net/http/http_cache_transaction.cc (right): https://codereview.chromium.org/672773002/diff/1/net/http/http_cache_transact... net/http/http_cache_transaction.cc:1222: if (!(effective_load_flags_ & LOAD_DISABLE_CACHE) && On 2014/10/23 19:45:42, David Benjamin wrote: > On 2014/10/23 19:36:09, rvargas wrote: > > On 2014/10/23 19:14:43, David Benjamin wrote: > > > Should this be mode_ != NONE or mode_ & WRITE or something of the sort? It > > looks > > > like LOAD_DISABLE_CACHE figures into ShouldPassThrough() which then controls > > > mode_. > > > > There are multiple causes for mode_ to change between ShouldPassThrough() and > > this point. What this line is saying is "unless the conditions when request > was > > made indicated that this should not affect the cache at all, we should > > invalidate any cached entry at this point" > > Ohh, I see. This is about invalidating GETs after a successful POST, not > something about a cache entry attached to the current request or so. > > Perhaps it's worth a comment above 1222 so it's clearer what this block is > doing? Done.
The CQ bit was checked by rvargas@chromium.org
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/672773002/20001
Message was sent while issue was closed.
Committed patchset #2 (id:20001)
Message was sent while issue was closed.
Patchset 2 (id:??) landed as https://crrev.com/8e4b4b6ae451720d637556433099a68dab46d4ee Cr-Commit-Position: refs/heads/master@{#300950} |