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

Issue 2355023002: Preserving Content-Type header from http request in OpenURL path. (Closed)

Created:
4 years, 3 months ago by Łukasz Anforowicz
Modified:
4 years, 2 months ago
Reviewers:
Charlie Reis, nasko, mmenke
CC:
chromium-reviews, blink-reviews, site-isolation-reviews_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Preserving extra http request headers in OpenURL navigation path. This CL makes sure that extra http request headers (e.g. in case of HTTP POST, the Content-Type: multipart/form-data; boundary=... header) are preserved when navigation uses the "OpenURL" code path. BUG=648648 CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_site_isolation Committed: https://crrev.com/f097ee58fe6bb4c329999f03253bc4849cc50302 Cr-Commit-Position: refs/heads/master@{#424588}

Patch Set 1 #

Patch Set 2 : Fixing the bug. #

Patch Set 3 : Filtering out Upgrade-Insecure-Requests header when constructing OpenURL IPC. #

Patch Set 4 : Rebasing... #

Total comments: 11

Patch Set 5 : Rebasing... #

Total comments: 4

Patch Set 6 : Addressed CR feedback from creis@. #

Patch Set 7 : Filtering headers in PrerenderManager instead. #

Total comments: 4

Patch Set 8 : Reordered fields of FrameHostMsg_OpenURL_Params to match order in content::OpenURLParams. #

Total comments: 6

Patch Set 9 : s/...PrerenderedContents/...PrerenderContents/ + extra braces around if body. #

Patch Set 10 : Rebasing - changes in prerender_manager.cc no longer needed thanks to https://crrev.com/2400033002. #

Patch Set 11 : Rebasing... #

Patch Set 12 : Go back to filtering of headers by code inside prerender_manager.cc #

Total comments: 4

Patch Set 13 : Simplified AreExtraHeadersCompatibleWithPrerenderContents as suggested by mmenke@. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+96 lines, -34 lines) Patch
M chrome/browser/prerender/prerender_manager.cc View 1 2 3 4 5 6 7 8 9 10 11 12 4 chunks +25 lines, -2 lines 0 comments Download
M content/browser/frame_host/navigator.h View 1 2 3 4 5 6 7 8 9 2 chunks +3 lines, -1 line 0 comments Download
M content/browser/frame_host/navigator_impl.h View 1 2 3 4 5 6 7 8 9 1 chunk +12 lines, -11 lines 0 comments Download
M content/browser/frame_host/navigator_impl.cc View 1 2 3 4 5 6 7 8 9 10 6 chunks +7 lines, -3 lines 0 comments Download
M content/browser/frame_host/render_frame_host_impl.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +3 lines, -2 lines 0 comments Download
M content/browser/frame_host/render_frame_host_manager.cc View 1 2 3 4 5 6 7 8 9 10 2 chunks +9 lines, -1 line 0 comments Download
M content/browser/frame_host/render_frame_proxy_host.cc View 1 2 3 4 5 6 7 1 chunk +5 lines, -1 line 0 comments Download
M content/browser/security_exploit_browsertest.cc View 1 2 3 4 1 chunk +2 lines, -2 lines 0 comments Download
M content/common/frame_messages.h View 1 2 3 4 5 6 7 8 9 1 chunk +1 line, -0 lines 0 comments Download
M content/renderer/render_frame_impl.h View 1 2 3 4 5 6 7 8 9 1 chunk +1 line, -0 lines 0 comments Download
M content/renderer/render_frame_impl.cc View 1 2 3 4 5 6 7 8 9 10 8 chunks +12 lines, -6 lines 0 comments Download
M content/renderer/render_frame_proxy.cc View 1 3 4 5 6 1 chunk +1 line, -0 lines 0 comments Download
A + third_party/WebKit/LayoutTests/http/tests/navigation/form-with-enctype-targets-cross-site-frame.html View 2 chunks +14 lines, -4 lines 0 comments Download
A + third_party/WebKit/LayoutTests/http/tests/navigation/form-with-enctype-targets-cross-site-frame-expected.txt View 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 74 (50 generated)
Łukasz Anforowicz
Charlie, can you please take a look? https://codereview.chromium.org/2355023002/diff/60001/content/browser/frame_host/render_frame_host_manager.cc File content/browser/frame_host/render_frame_host_manager.cc (right): https://codereview.chromium.org/2355023002/diff/60001/content/browser/frame_host/render_frame_host_manager.cc#newcode493 content/browser/frame_host/render_frame_host_manager.cc:493: std::string() /* ...
4 years, 3 months ago (2016-09-22 21:23:17 UTC) #17
Łukasz Anforowicz
+tsepez@ as FYI for the XSSAuditor-related comment below. https://codereview.chromium.org/2355023002/diff/60001/content/browser/frame_host/render_frame_host_manager.cc File content/browser/frame_host/render_frame_host_manager.cc (right): https://codereview.chromium.org/2355023002/diff/60001/content/browser/frame_host/render_frame_host_manager.cc#newcode493 content/browser/frame_host/render_frame_host_manager.cc:493: std::string() ...
4 years, 2 months ago (2016-09-27 18:58:36 UTC) #18
Tom Sepez
https://codereview.chromium.org/2355023002/diff/60001/content/browser/frame_host/render_frame_host_manager.cc File content/browser/frame_host/render_frame_host_manager.cc (right): https://codereview.chromium.org/2355023002/diff/60001/content/browser/frame_host/render_frame_host_manager.cc#newcode493 content/browser/frame_host/render_frame_host_manager.cc:493: std::string() /* extra_headers */); That's correct.
4 years, 2 months ago (2016-09-27 19:59:10 UTC) #20
Charlie Reis
Thanks, and sorry for the delay. I think the main question is around the filtering ...
4 years, 2 months ago (2016-09-30 21:31:55 UTC) #25
Łukasz Anforowicz
Thanks Charlie. Please take a look at the changes in the latest patchset and my ...
4 years, 2 months ago (2016-09-30 23:17:00 UTC) #28
Charlie Reis
On 2016/09/30 23:17:00, Łukasz Anforowicz wrote: > Thanks Charlie. Please take a look at the ...
4 years, 2 months ago (2016-09-30 23:44:44 UTC) #29
Łukasz Anforowicz
On 2016/09/30 23:44:44, Charlie Reis wrote: > On 2016/09/30 23:17:00, Łukasz Anforowicz wrote: > > ...
4 years, 2 months ago (2016-10-01 00:10:31 UTC) #30
Łukasz Anforowicz
Charlie, in the latest patchset I moved header filtering to prerender_manager.cc, to see how this ...
4 years, 2 months ago (2016-10-04 14:09:49 UTC) #37
Charlie Reis
I like this new approach, and I agree with your reasoning that prerendering is a ...
4 years, 2 months ago (2016-10-06 17:39:51 UTC) #38
Łukasz Anforowicz
Thanks Charlie. On 2016/10/06 17:39:51, Charlie Reis wrote: > I like this new approach, and ...
4 years, 2 months ago (2016-10-06 18:07:30 UTC) #39
Łukasz Anforowicz
Nasko, can you do an IPC review please? (for content/common/frame_messages.h)
4 years, 2 months ago (2016-10-06 18:09:23 UTC) #41
nasko
https://codereview.chromium.org/2355023002/diff/120001/content/common/frame_messages.h File content/common/frame_messages.h (right): https://codereview.chromium.org/2355023002/diff/120001/content/common/frame_messages.h#newcode463 content/common/frame_messages.h:463: IPC_STRUCT_MEMBER(std::string, extra_headers) You've put this member after post body ...
4 years, 2 months ago (2016-10-06 18:15:01 UTC) #42
Tom Sepez
Deferring to Nasko.
4 years, 2 months ago (2016-10-06 18:27:26 UTC) #43
Łukasz Anforowicz
Nasko, can you take another look? https://codereview.chromium.org/2355023002/diff/120001/content/common/frame_messages.h File content/common/frame_messages.h (right): https://codereview.chromium.org/2355023002/diff/120001/content/common/frame_messages.h#newcode463 content/common/frame_messages.h:463: IPC_STRUCT_MEMBER(std::string, extra_headers) On ...
4 years, 2 months ago (2016-10-06 18:33:54 UTC) #46
nasko
LGTM
4 years, 2 months ago (2016-10-06 18:38:59 UTC) #48
Łukasz Anforowicz
mmenke@, could you PTAL at chrome/browser/prerender/prerender_manager.cc? Some discussion leaning toward filtering/ignoring some headers in prerender_manager.cc ...
4 years, 2 months ago (2016-10-06 18:45:08 UTC) #50
mmenke
https://codereview.chromium.org/2355023002/diff/140001/chrome/browser/prerender/prerender_manager.cc File chrome/browser/prerender/prerender_manager.cc (right): https://codereview.chromium.org/2355023002/diff/140001/chrome/browser/prerender/prerender_manager.cc#newcode90 chrome/browser/prerender/prerender_manager.cc:90: // |extra_headers| contains "Upgrade-Insecure-Requests" header. Would it make more ...
4 years, 2 months ago (2016-10-06 20:52:03 UTC) #53
Łukasz Anforowicz
https://codereview.chromium.org/2355023002/diff/140001/chrome/browser/prerender/prerender_manager.cc File chrome/browser/prerender/prerender_manager.cc (right): https://codereview.chromium.org/2355023002/diff/140001/chrome/browser/prerender/prerender_manager.cc#newcode90 chrome/browser/prerender/prerender_manager.cc:90: // |extra_headers| contains "Upgrade-Insecure-Requests" header. On 2016/10/06 20:52:02, mmenke ...
4 years, 2 months ago (2016-10-06 21:23:34 UTC) #54
mmenke
LGTM https://codereview.chromium.org/2355023002/diff/220001/chrome/browser/prerender/prerender_manager.cc File chrome/browser/prerender/prerender_manager.cc (right): https://codereview.chromium.org/2355023002/diff/220001/chrome/browser/prerender/prerender_manager.cc#newcode100 chrome/browser/prerender/prerender_manager.cc:100: return false; add braces. https://codereview.chromium.org/2355023002/diff/220001/chrome/browser/prerender/prerender_manager.cc#newcode101 chrome/browser/prerender/prerender_manager.cc:101: } optional: ...
4 years, 2 months ago (2016-10-11 20:46:33 UTC) #61
Łukasz Anforowicz
Thank you for reviewing. https://codereview.chromium.org/2355023002/diff/220001/chrome/browser/prerender/prerender_manager.cc File chrome/browser/prerender/prerender_manager.cc (right): https://codereview.chromium.org/2355023002/diff/220001/chrome/browser/prerender/prerender_manager.cc#newcode100 chrome/browser/prerender/prerender_manager.cc:100: return false; On 2016/10/11 20:46:33, ...
4 years, 2 months ago (2016-10-11 21:33:43 UTC) #64
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2355023002/240001
4 years, 2 months ago (2016-10-11 23:10:06 UTC) #69
commit-bot: I haz the power
Committed patchset #13 (id:240001)
4 years, 2 months ago (2016-10-11 23:18:19 UTC) #71
commit-bot: I haz the power
Patchset 13 (id:??) landed as https://crrev.com/f097ee58fe6bb4c329999f03253bc4849cc50302 Cr-Commit-Position: refs/heads/master@{#424588}
4 years, 2 months ago (2016-10-11 23:20:59 UTC) #73
Łukasz Anforowicz
4 years, 2 months ago (2016-10-14 15:22:38 UTC) #74
Message was sent while issue was closed.
A revert of this CL (patchset #13 id:240001) has been created in
https://codereview.chromium.org/2419093002/ by lukasza@chromium.org.

The reason for reverting is: This CL caused a regression -
https://crbug.com/655568..

Powered by Google App Engine
This is Rietveld 408576698