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

Issue 1558703002: Synchronous requests that get a 304 clobber the cached response body. (Closed)

Created:
4 years, 11 months ago by Nate Chapin
Modified:
4 years, 11 months ago
Reviewers:
Yoav Weiss
CC:
chromium-reviews, blink-reviews, loading-reviews+fetch_chromium.org, tyoshino+watch_chromium.org, gavinp+loader_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Synchronous requests that get a 304 clobber the cached response body. ResourceLoader::requestSynchronously blindly copies the response data to Resource, even if it's empty. In the 304 case, this results in overwriting the correct data in Resource::m_data with an empty buffer. BUG=570622 TEST=http/tests/cache/sync-xhr-304.html Committed: https://crrev.com/a3e33238e770cc9543f89db94329fc5fdfadc2ef Cr-Commit-Position: refs/heads/master@{#368497}

Patch Set 1 #

Total comments: 3

Patch Set 2 : #

Patch Set 3 : Add comment #

Unified diffs Side-by-side diffs Delta from patch set Stats (+37 lines, -3 lines) Patch
A third_party/WebKit/LayoutTests/http/tests/cache/resources/etag.php View 1 chunk +10 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/http/tests/cache/sync-xhr-304.html View 1 chunk +16 lines, -0 lines 0 comments Download
A + third_party/WebKit/LayoutTests/http/tests/cache/sync-xhr-304-expected.txt View 1 chunk +2 lines, -1 line 0 comments Download
M third_party/WebKit/Source/core/fetch/ResourceLoader.cpp View 1 2 1 chunk +9 lines, -2 lines 0 comments Download

Messages

Total messages: 21 (8 generated)
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1558703002/1 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1558703002/1
4 years, 11 months ago (2015-12-30 23:57:11 UTC) #2
Nate Chapin
yoav, would you mind reviewing this? A nice, small bugfix :)
4 years, 11 months ago (2015-12-30 23:58:55 UTC) #4
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 11 months ago (2015-12-31 01:16:28 UTC) #6
Yoav Weiss
Sure! :) https://codereview.chromium.org/1558703002/diff/1/third_party/WebKit/Source/core/fetch/ResourceLoader.cpp File third_party/WebKit/Source/core/fetch/ResourceLoader.cpp (right): https://codereview.chromium.org/1558703002/diff/1/third_party/WebKit/Source/core/fetch/ResourceLoader.cpp#newcode519 third_party/WebKit/Source/core/fetch/ResourceLoader.cpp:519: if (dataOut.size()) Isn't there a scenario where ...
4 years, 11 months ago (2015-12-31 06:29:17 UTC) #7
Nate Chapin
https://codereview.chromium.org/1558703002/diff/1/third_party/WebKit/Source/core/fetch/ResourceLoader.cpp File third_party/WebKit/Source/core/fetch/ResourceLoader.cpp (right): https://codereview.chromium.org/1558703002/diff/1/third_party/WebKit/Source/core/fetch/ResourceLoader.cpp#newcode519 third_party/WebKit/Source/core/fetch/ResourceLoader.cpp:519: if (dataOut.size()) On 2015/12/31 06:29:17, Yoav Weiss wrote: > ...
4 years, 11 months ago (2016-01-04 22:15:54 UTC) #9
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1558703002/20001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1558703002/20001
4 years, 11 months ago (2016-01-04 22:17:20 UTC) #10
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
4 years, 11 months ago (2016-01-04 23:30:13 UTC) #12
Yoav Weiss
The relationship between 304 and dataOut.size() is not entirely clear to me, sorry. I'll try ...
4 years, 11 months ago (2016-01-05 14:13:03 UTC) #13
Nate Chapin
On 2016/01/05 14:13:03, Yoav Weiss wrote: > The relationship between 304 and dataOut.size() is not ...
4 years, 11 months ago (2016-01-05 22:53:02 UTC) #14
Yoav Weiss
On 2016/01/05 22:53:02, Nate Chapin wrote: > On 2016/01/05 14:13:03, Yoav Weiss wrote: > > ...
4 years, 11 months ago (2016-01-05 23:23:12 UTC) #15
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1558703002/40001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1558703002/40001
4 years, 11 months ago (2016-01-08 23:42:22 UTC) #18
commit-bot: I haz the power
Committed patchset #3 (id:40001)
4 years, 11 months ago (2016-01-09 01:15:53 UTC) #19
commit-bot: I haz the power
4 years, 11 months ago (2016-01-09 01:17:12 UTC) #21
Message was sent while issue was closed.
Patchset 3 (id:??) landed as
https://crrev.com/a3e33238e770cc9543f89db94329fc5fdfadc2ef
Cr-Commit-Position: refs/heads/master@{#368497}

Powered by Google App Engine
This is Rietveld 408576698