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

Issue 294193002: Set response headers for data URL. (Closed)

Created:
6 years, 7 months ago by tyoshino (SeeGerritForStatus)
Modified:
6 years, 3 months ago
CC:
chromium-reviews, darin-cc_chromium.org, jam, eseidel, sof, abarth-chromium, willchan no longer on Chromium, eroman
Visibility:
Public.

Description

Set response headers for data URL. Resources represented by a data URL will stay being considered to be unique origin resource but are changed to allow cross origin access by the Access-Control-Allow-Origin header. We take this approach mainly because we want scripts in an iframe with a data URL specified to its src attribute to be executed as a script on a unique origin resource, not on the parent frame. We can choose to treat "loading" of data URL specially as same origin while execution as different origin. But such an approach complicates security policy checking algorithm. Grammar checking code is added to ensure we emit a valid content-type. Blink side CL https://codereview.chromium.org/54173002/ will be landed first to temporarily disable layout tests that will break, and then this CL will be landed. BUG=308768 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=291007 Committed: https://crrev.com/05a2bf0bb57be3e4a180d5709703eef4b121ff3f Cr-Commit-Position: refs/heads/master@{#294107}

Patch Set 1 #

Total comments: 12

Patch Set 2 : Addressed #7 #

Patch Set 3 : #

Patch Set 4 : #

Patch Set 5 : #

Total comments: 4

Patch Set 6 : Addressed #10 #

Total comments: 1

Patch Set 7 : Rebase #

Patch Set 8 : Addressing #13 #

Patch Set 9 : #

Patch Set 10 : #

Patch Set 11 : #

Patch Set 12 : #

Total comments: 4

Patch Set 13 : Addressed #19 #

Total comments: 4

Patch Set 14 : Addressed #21 #

Patch Set 15 : Remove GURL decl #

Patch Set 16 : Rebase #

Patch Set 17 : Add LICENSE boilerplate #

Patch Set 18 : Remove time.h #

Patch Set 19 : Remove GURL forward declaration #

Patch Set 20 : Add NET_EXPORT #

Patch Set 21 : Rebased for reland #

Patch Set 22 : Rebased on https://codereview.chromium.org/480413007/ #

Patch Set 23 : #

Patch Set 24 : Rebase #

Patch Set 25 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+185 lines, -41 lines) Patch
M content/child/web_url_loader_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 5 chunks +38 lines, -35 lines 0 comments Download
M net/base/data_url.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 2 chunks +5 lines, -0 lines 0 comments Download
M net/base/data_url_unittest.cc View 1 2 3 4 5 6 7 8 9 1 chunk +4 lines, -4 lines 0 comments Download
M net/net.gypi View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 1 chunk +1 line, -0 lines 0 comments Download
M net/url_request/url_request_data_job.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 1 chunk +12 lines, -1 line 0 comments Download
M net/url_request/url_request_data_job.cc View 1 2 3 4 5 6 7 8 9 10 11 12 2 chunks +36 lines, -1 line 0 comments Download
A net/url_request/url_request_data_job_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1 chunk +89 lines, -0 lines 0 comments Download

Messages

Total messages: 60 (1 generated)
tyoshino (SeeGerritForStatus)
This change was originally reviewed at https://codereview.chromium.org/54233002/ Since the change in net/ is useful regardless ...
6 years, 7 months ago (2014-05-22 07:13:51 UTC) #1
eseidel
None of the listed reviewers are content/ owners: https://chromium.googlesource.com/chromium/src/+/master/content/OWNERS
6 years, 7 months ago (2014-05-22 17:35:41 UTC) #2
tyoshino (SeeGerritForStatus)
On 2014/05/22 17:35:41, eseidel wrote: > None of the listed reviewers are content/ owners: > ...
6 years, 7 months ago (2014-05-22 18:16:26 UTC) #3
jam
Darin would be a better reviewer to know about side-effects of this change.
6 years, 7 months ago (2014-05-23 15:07:12 UTC) #4
eseidel
There are quite a few net owners. Maybe willchan has more cycles than darin? https://code.google.com/p/chromium/codesearch#chromium/src/net/OWNERS&q=net/OWNERS&sq=package:chromium&l=1
6 years, 6 months ago (2014-05-28 23:27:55 UTC) #5
eseidel
Hmm, willchan is traveling. Maybe eroman is available for consult? I get the impression we're ...
6 years, 6 months ago (2014-05-28 23:29:00 UTC) #6
eroman
lgtm https://codereview.chromium.org/294193002/diff/1/content/child/web_url_loader_impl.cc File content/child/web_url_loader_impl.cc (right): https://codereview.chromium.org/294193002/diff/1/content/child/web_url_loader_impl.cc#newcode88 content/child/web_url_loader_impl.cc:88: // quoted-string since it's an attibute value of ...
6 years, 6 months ago (2014-05-29 01:23:26 UTC) #7
tyoshino (SeeGerritForStatus)
Thanks https://codereview.chromium.org/294193002/diff/1/content/child/web_url_loader_impl.cc File content/child/web_url_loader_impl.cc (right): https://codereview.chromium.org/294193002/diff/1/content/child/web_url_loader_impl.cc#newcode88 content/child/web_url_loader_impl.cc:88: // quoted-string since it's an attibute value of ...
6 years, 6 months ago (2014-05-29 07:21:24 UTC) #8
tyoshino (SeeGerritForStatus)
jam@, review by eroman@ from net should be enough. Could you please take a look ...
6 years, 6 months ago (2014-06-02 04:24:19 UTC) #9
darin (slow to review)
https://codereview.chromium.org/294193002/diff/80001/content/child/web_url_loader_impl.cc File content/child/web_url_loader_impl.cc (right): https://codereview.chromium.org/294193002/diff/80001/content/child/web_url_loader_impl.cc#newcode74 content/child/web_url_loader_impl.cc:74: if (!net::DataURL::Parse(url, &mime_type, &charset, data)) Keep in mind that ...
6 years, 6 months ago (2014-06-02 16:49:25 UTC) #10
tyoshino (SeeGerritForStatus)
https://codereview.chromium.org/294193002/diff/80001/content/child/web_url_loader_impl.cc File content/child/web_url_loader_impl.cc (right): https://codereview.chromium.org/294193002/diff/80001/content/child/web_url_loader_impl.cc#newcode74 content/child/web_url_loader_impl.cc:74: if (!net::DataURL::Parse(url, &mime_type, &charset, data)) On 2014/06/02 16:49:25, darin ...
6 years, 6 months ago (2014-06-03 13:04:38 UTC) #11
tyoshino (SeeGerritForStatus)
ping, darin. Thanks
6 years, 6 months ago (2014-06-16 09:33:26 UTC) #12
darin (slow to review)
On 2014/06/16 09:33:26, tyoshino wrote: > ping, darin. Thanks It feels risky to make the ...
6 years, 6 months ago (2014-06-16 18:20:47 UTC) #13
darin (slow to review)
6 years, 6 months ago (2014-06-16 18:21:37 UTC) #14
robwu
https://codereview.chromium.org/294193002/diff/100001/content/child/web_url_loader_impl.cc File content/child/web_url_loader_impl.cc (right): https://codereview.chromium.org/294193002/diff/100001/content/child/web_url_loader_impl.cc#newcode98 content/child/web_url_loader_impl.cc:98: headers->AddHeader("Access-Control-Allow-Origin: *"); Could you also add the following line: ...
6 years, 4 months ago (2014-07-29 10:44:44 UTC) #15
tyoshino (SeeGerritForStatus)
On 2014/07/29 10:44:44, robwu wrote: > https://codereview.chromium.org/294193002/diff/100001/content/child/web_url_loader_impl.cc > File content/child/web_url_loader_impl.cc (right): > > https://codereview.chromium.org/294193002/diff/100001/content/child/web_url_loader_impl.cc#newcode98 > ...
6 years, 4 months ago (2014-08-05 08:21:56 UTC) #16
tyoshino (SeeGerritForStatus)
On 2014/06/16 18:20:47, darin wrote: > On 2014/06/16 09:33:26, tyoshino wrote: > > ping, darin. ...
6 years, 4 months ago (2014-08-05 08:33:12 UTC) #17
tyoshino (SeeGerritForStatus)
On 2014/08/05 08:33:12, tyoshino wrote: > Please take a look again, darin@. ping
6 years, 4 months ago (2014-08-18 04:31:56 UTC) #18
darin (slow to review)
https://codereview.chromium.org/294193002/diff/220001/content/child/web_url_loader_impl_unittest.cc File content/child/web_url_loader_impl_unittest.cc (right): https://codereview.chromium.org/294193002/diff/220001/content/child/web_url_loader_impl_unittest.cc#newcode57 content/child/web_url_loader_impl_unittest.cc:57: TEST(GetInfoFromDataURLTest, Simple) { I think the unit testing in ...
6 years, 4 months ago (2014-08-18 20:23:58 UTC) #19
tyoshino (SeeGerritForStatus)
Thanks https://codereview.chromium.org/294193002/diff/220001/content/child/web_url_loader_impl_unittest.cc File content/child/web_url_loader_impl_unittest.cc (right): https://codereview.chromium.org/294193002/diff/220001/content/child/web_url_loader_impl_unittest.cc#newcode57 content/child/web_url_loader_impl_unittest.cc:57: TEST(GetInfoFromDataURLTest, Simple) { On 2014/08/18 20:23:58, darin wrote: ...
6 years, 4 months ago (2014-08-19 13:44:56 UTC) #20
darin (slow to review)
LGTM https://codereview.chromium.org/294193002/diff/240001/content/child/web_url_loader_impl.h File content/child/web_url_loader_impl.h (right): https://codereview.chromium.org/294193002/diff/240001/content/child/web_url_loader_impl.h#newcode8 content/child/web_url_loader_impl.h:8: #include <string> nit: this include and perhaps the ...
6 years, 4 months ago (2014-08-19 20:50:08 UTC) #21
tyoshino (SeeGerritForStatus)
https://codereview.chromium.org/294193002/diff/240001/content/child/web_url_loader_impl.h File content/child/web_url_loader_impl.h (right): https://codereview.chromium.org/294193002/diff/240001/content/child/web_url_loader_impl.h#newcode8 content/child/web_url_loader_impl.h:8: #include <string> On 2014/08/19 20:50:08, darin wrote: > nit: ...
6 years, 4 months ago (2014-08-20 07:09:52 UTC) #22
tyoshino (SeeGerritForStatus)
The CQ bit was checked by tyoshino@chromium.org
6 years, 4 months ago (2014-08-20 07:10:53 UTC) #23
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/tyoshino@chromium.org/294193002/280001
6 years, 4 months ago (2014-08-20 07:11:20 UTC) #24
commit-bot: I haz the power
FYI, CQ is re-trying this CL (attempt #1). The failing builders are: linux_gpu on tryserver.chromium.gpu ...
6 years, 4 months ago (2014-08-20 07:19:51 UTC) #25
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 4 months ago (2014-08-20 07:20:52 UTC) #26
commit-bot: I haz the power
Try jobs failed on following builders: mac_chromium_compile_dbg on tryserver.chromium.mac (http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_compile_dbg/builds/7600) mac_chromium_rel_swarming on tryserver.chromium.mac (http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_rel_swarming/builds/5004)
6 years, 4 months ago (2014-08-20 07:20:53 UTC) #27
tyoshino (SeeGerritForStatus)
The CQ bit was checked by tyoshino@chromium.org
6 years, 4 months ago (2014-08-20 07:33:33 UTC) #28
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/tyoshino@chromium.org/294193002/300001
6 years, 4 months ago (2014-08-20 07:34:30 UTC) #29
commit-bot: I haz the power
FYI, CQ is re-trying this CL (attempt #1). The failing builders are: linux_gpu_triggered_tests on tryserver.chromium.gpu ...
6 years, 4 months ago (2014-08-20 08:38:16 UTC) #30
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 4 months ago (2014-08-20 08:41:31 UTC) #31
commit-bot: I haz the power
Try jobs failed on following builders: chromium_presubmit on tryserver.chromium.linux (http://build.chromium.org/p/tryserver.chromium.linux/builders/chromium_presubmit/builds/5441)
6 years, 4 months ago (2014-08-20 08:41:33 UTC) #32
tyoshino (SeeGerritForStatus)
The CQ bit was checked by tyoshino@chromium.org
6 years, 4 months ago (2014-08-20 09:00:03 UTC) #33
tyoshino (SeeGerritForStatus)
The CQ bit was unchecked by tyoshino@chromium.org
6 years, 4 months ago (2014-08-20 09:00:20 UTC) #34
tyoshino (SeeGerritForStatus)
The CQ bit was checked by tyoshino@chromium.org
6 years, 4 months ago (2014-08-20 09:01:31 UTC) #35
tyoshino (SeeGerritForStatus)
The CQ bit was unchecked by tyoshino@chromium.org
6 years, 4 months ago (2014-08-20 09:02:50 UTC) #36
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/tyoshino@chromium.org/294193002/340001
6 years, 4 months ago (2014-08-20 09:02:52 UTC) #37
tyoshino (SeeGerritForStatus)
The CQ bit was checked by tyoshino@chromium.org
6 years, 4 months ago (2014-08-20 09:03:15 UTC) #38
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/tyoshino@chromium.org/294193002/360001
6 years, 4 months ago (2014-08-20 09:03:30 UTC) #39
commit-bot: I haz the power
FYI, CQ is re-trying this CL (attempt #1). The failing builders are: android_chromium_gn_compile_rel on tryserver.chromium.linux ...
6 years, 4 months ago (2014-08-20 10:31:29 UTC) #40
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 4 months ago (2014-08-20 10:35:23 UTC) #41
commit-bot: I haz the power
Try jobs failed on following builders: mac_chromium_compile_dbg on tryserver.chromium.mac (http://build.chromium.org/p/tryserver.chromium.mac/builders/mac_chromium_compile_dbg/builds/7642)
6 years, 4 months ago (2014-08-20 10:35:24 UTC) #42
tyoshino (SeeGerritForStatus)
Added NET_EXPORT to URLRequestDataJob
6 years, 4 months ago (2014-08-20 13:13:15 UTC) #43
tyoshino (SeeGerritForStatus)
The CQ bit was checked by tyoshino@chromium.org
6 years, 4 months ago (2014-08-20 13:13:33 UTC) #44
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/tyoshino@chromium.org/294193002/380001
6 years, 4 months ago (2014-08-20 13:14:06 UTC) #45
commit-bot: I haz the power
FYI, CQ is re-trying this CL (attempt #1). The failing builders are: android_dbg_tests_recipe on tryserver.chromium.linux ...
6 years, 4 months ago (2014-08-20 14:33:17 UTC) #46
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 4 months ago (2014-08-20 15:24:35 UTC) #47
commit-bot: I haz the power
Try jobs failed on following builders: android_dbg_tests_recipe on tryserver.chromium.linux (http://build.chromium.org/p/tryserver.chromium.linux/builders/android_dbg_tests_recipe/builds/638)
6 years, 4 months ago (2014-08-20 15:24:37 UTC) #48
tyoshino (SeeGerritForStatus)
The CQ bit was checked by tyoshino@chromium.org
6 years, 4 months ago (2014-08-21 03:47:50 UTC) #49
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/tyoshino@chromium.org/294193002/380001
6 years, 4 months ago (2014-08-21 03:49:21 UTC) #50
commit-bot: I haz the power
Committed patchset #20 (380001) as 291007
6 years, 4 months ago (2014-08-21 04:55:37 UTC) #51
tyoshino (SeeGerritForStatus)
Reverted. See crbug.com/405841 for the reason.
6 years, 4 months ago (2014-08-21 07:34:16 UTC) #52
tyoshino (SeeGerritForStatus)
Now depends on https://codereview.chromium.org/480413007/
6 years, 4 months ago (2014-08-26 03:48:35 UTC) #53
tyoshino (SeeGerritForStatus)
Rebased on https://codereview.chromium.org/480413007/
6 years, 3 months ago (2014-09-04 08:13:10 UTC) #54
tyoshino (SeeGerritForStatus)
Checked that this works with https://codereview.chromium.org/492183002/ (reenabling data URL layout tests). Relanding.
6 years, 3 months ago (2014-09-10 02:19:53 UTC) #55
tyoshino (SeeGerritForStatus)
Rebased to ToT.
6 years, 3 months ago (2014-09-10 03:22:04 UTC) #56
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/tyoshino@chromium.org/294193002/480001
6 years, 3 months ago (2014-09-10 03:25:59 UTC) #58
commit-bot: I haz the power
Committed patchset #25 (id:480001) as 717523d865cf857077c929a0ccae4b6ee91f2c91
6 years, 3 months ago (2014-09-10 05:11:30 UTC) #59
commit-bot: I haz the power
6 years, 3 months ago (2014-09-10 05:15:33 UTC) #60
Message was sent while issue was closed.
Patchset 25 (id:??) landed as
https://crrev.com/05a2bf0bb57be3e4a180d5709703eef4b121ff3f
Cr-Commit-Position: refs/heads/master@{#294107}

Powered by Google App Engine
This is Rietveld 408576698