|
|
Created:
3 years, 9 months ago by hiroshige Modified:
3 years, 9 months ago CC:
chromium-reviews, tyoshino+watch_chromium.org, loading-reviews_chromium.org, gavinp+loader_chromium.org, blink-reviews, loading-reviews+fetch_chromium.org, kinuko+watch, Nate Chapin Target Ref:
refs/heads/master Project:
chromium Visibility:
Public. |
DescriptionSet the same headers for data URLs in WebURLLoaderImpl and ResourceFetcher
Response headers are appended by net::URLRequestDataJob::BuildResponse()
when WebURLLoaderImpl returns data URL response in a renderer process,
but not when ResourceFetcher returns data URL response synchronously by
ResourceFetcher::resourceForStaticData().
This CL makes the response headers to be added in both cases, by making
NetworkUtils::parseDataURL() (that is used from resourceForStaticData())
to call net::URLRequestDataJob::BuildResponse() and set response headers.
BUG=704032
Review-Url: https://codereview.chromium.org/2766583002
Cr-Commit-Position: refs/heads/master@{#459026}
Committed: https://chromium.googlesource.com/chromium/src/+/5b0d721fcc5ac7f22db722c7514a52acf8b661ea
Patch Set 1 #Patch Set 2 : Remove unused local variables #
Total comments: 3
Patch Set 3 : Add a comment #
Total comments: 1
Patch Set 4 : Rebase #
Total comments: 4
Patch Set 5 : reflect comments #
Messages
Total messages: 52 (33 generated)
The CQ bit was checked by hiroshige@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was checked by hiroshige@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
Description was changed from ========== Set the same headers for data URLs in WebURLLoaderImpl and ResourceFetcher BUG= ========== to ========== Set the same headers for data URLs in WebURLLoaderImpl and ResourceFetcher Response headers are appended by net::URLRequestDataJob::BuildResponse() when WebURLLoaderImpl returns data URL response in a renderer process, but not when ResourceFetcher returns data URL response synchronously by ResourceFetcher::resourceForStaticData(). This CL makes the response headers to be added in both cases, by making NetworkUtils::parseDataURL() (that is used from resourceForStaticData()) to call net::URLRequestDataJob::BuildResponse() and set response headers. BUG= ==========
hiroshige@chromium.org changed reviewers: + kinuko@chromium.org, yhirano@chromium.org
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
kouhei@chromium.org changed reviewers: + kouhei@chromium.org
Thanks for working on this! https://codereview.chromium.org/2766583002/diff/20001/third_party/WebKit/Sour... File third_party/WebKit/Source/platform/loader/fetch/ResourceFetcher.cpp (right): https://codereview.chromium.org/2766583002/diff/20001/third_party/WebKit/Sour... third_party/WebKit/Source/platform/loader/fetch/ResourceFetcher.cpp:375: data = PassRefPtr<SharedBuffer>(NetworkUtils::parseDataURL(url, response)); can we note that response is modified by parseDataURL? (I thought response was used here uninit)
PTAL. https://codereview.chromium.org/2766583002/diff/20001/third_party/WebKit/Sour... File third_party/WebKit/Source/platform/loader/fetch/ResourceFetcher.cpp (left): https://codereview.chromium.org/2766583002/diff/20001/third_party/WebKit/Sour... third_party/WebKit/Source/platform/loader/fetch/ResourceFetcher.cpp:391: response.setHTTPStatusCode(200); This block is moved to parseDataURL().
https://codereview.chromium.org/2766583002/diff/20001/third_party/WebKit/Sour... File third_party/WebKit/Source/platform/loader/fetch/ResourceFetcher.cpp (right): https://codereview.chromium.org/2766583002/diff/20001/third_party/WebKit/Sour... third_party/WebKit/Source/platform/loader/fetch/ResourceFetcher.cpp:375: data = PassRefPtr<SharedBuffer>(NetworkUtils::parseDataURL(url, response)); On 2017/03/21 07:29:20, kouhei wrote: > can we note that response is modified by parseDataURL? > (I thought response was used here uninit) Done.
The CQ bit was checked by hiroshige@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
kouhei@chromium.org changed reviewers: + toyoshim@chromium.org
https://codereview.chromium.org/2766583002/diff/40001/third_party/WebKit/Sour... File third_party/WebKit/Source/platform/network/DEPS (right): https://codereview.chromium.org/2766583002/diff/40001/third_party/WebKit/Sour... third_party/WebKit/Source/platform/network/DEPS:10: "+net/url_request/url_request_data_job.h", Should we move NetworkUtils or parseDataURL to platform/loader?
Could we file a bug for this one (or use an existing bug)? Should this code maybe live in its own file rather than in NetworkUtils (which contains more lower-layer stuff)?
Discussed offline. We would move platform/network to platform/loader/base. Probably it's fine to use crbug.com/699369 to leave file moving works as a TODO?
Description was changed from ========== Set the same headers for data URLs in WebURLLoaderImpl and ResourceFetcher Response headers are appended by net::URLRequestDataJob::BuildResponse() when WebURLLoaderImpl returns data URL response in a renderer process, but not when ResourceFetcher returns data URL response synchronously by ResourceFetcher::resourceForStaticData(). This CL makes the response headers to be added in both cases, by making NetworkUtils::parseDataURL() (that is used from resourceForStaticData()) to call net::URLRequestDataJob::BuildResponse() and set response headers. BUG= ========== to ========== Set the same headers for data URLs in WebURLLoaderImpl and ResourceFetcher Response headers are appended by net::URLRequestDataJob::BuildResponse() when WebURLLoaderImpl returns data URL response in a renderer process, but not when ResourceFetcher returns data URL response synchronously by ResourceFetcher::resourceForStaticData(). This CL makes the response headers to be added in both cases, by making NetworkUtils::parseDataURL() (that is used from resourceForStaticData()) to call net::URLRequestDataJob::BuildResponse() and set response headers. BUG=704032 ==========
On 2017/03/22 06:26:21, Takashi Toyoshima wrote: > Could we file a bug for this one (or use an existing bug)? Created Issue 704032. > Discussed offline. We would move platform/network to platform/loader/base. > Probably it's fine to use crbug.com/699369 to leave file moving works as a TODO? Do we need TODO inside this CL?
The CQ bit was checked by hiroshige@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: This issue passed the CQ dry run.
lgtm, given that we're going to restructure the file/directory soon https://codereview.chromium.org/2766583002/diff/60001/third_party/WebKit/Sour... File third_party/WebKit/Source/platform/network/NetworkUtils.h (right): https://codereview.chromium.org/2766583002/diff/60001/third_party/WebKit/Sour... third_party/WebKit/Source/platform/network/NetworkUtils.h:33: PLATFORM_EXPORT PassRefPtr<SharedBuffer> parseDataURL(const KURL&, nit: can we rename this to sth like parseDataURLAndPopulateResponse() ?
lgtm https://codereview.chromium.org/2766583002/diff/60001/third_party/WebKit/Sour... File third_party/WebKit/Source/platform/network/NetworkUtils.cpp (right): https://codereview.chromium.org/2766583002/diff/60001/third_party/WebKit/Sour... third_party/WebKit/Source/platform/network/NetworkUtils.cpp:104: return std::move(data); I don't think std::move is needed here, as we can assume NRVO
The CQ bit was checked by hiroshige@chromium.org to run a CQ dry run
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
https://codereview.chromium.org/2766583002/diff/60001/third_party/WebKit/Sour... File third_party/WebKit/Source/platform/network/NetworkUtils.cpp (right): https://codereview.chromium.org/2766583002/diff/60001/third_party/WebKit/Sour... third_party/WebKit/Source/platform/network/NetworkUtils.cpp:104: return std::move(data); On 2017/03/23 00:37:15, kouhei wrote: > I don't think std::move is needed here, as we can assume NRVO Done. https://codereview.chromium.org/2766583002/diff/60001/third_party/WebKit/Sour... File third_party/WebKit/Source/platform/network/NetworkUtils.h (right): https://codereview.chromium.org/2766583002/diff/60001/third_party/WebKit/Sour... third_party/WebKit/Source/platform/network/NetworkUtils.h:33: PLATFORM_EXPORT PassRefPtr<SharedBuffer> parseDataURL(const KURL&, On 2017/03/22 14:05:38, kinuko wrote: > nit: can we rename this to sth like parseDataURLAndPopulateResponse() ? Done.
The CQ bit was unchecked by commit-bot@chromium.org
Dry run: Try jobs failed on following builders: chromeos_daisy_chromium_compile_only_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromeos_daisy_...)
The CQ bit was checked by hiroshige@chromium.org
The patchset sent to the CQ was uploaded after l-g-t-m from kinuko@chromium.org, kouhei@chromium.org Link to the patchset: https://codereview.chromium.org/2766583002/#ps80001 (title: "reflect comments")
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Try jobs failed on following builders: chromeos_daisy_chromium_compile_only_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromeos_daisy_...)
lgtm
The CQ bit was checked by hiroshige@chromium.org
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Try jobs failed on following builders: chromeos_daisy_chromium_compile_only_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromeos_daisy_...)
The CQ bit was checked by hiroshige@chromium.org
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
The CQ bit was unchecked by commit-bot@chromium.org
Try jobs failed on following builders: chromeos_daisy_chromium_compile_only_ng on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromeos_daisy_...)
The CQ bit was checked by kouhei@chromium.org
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
CQ is committing da patch. Bot data: {"patchset_id": 80001, "attempt_start_ts": 1490257134549090, "parent_rev": "33a5703a620ec246ee08214e6c880068b6e9d687", "commit_rev": "5b0d721fcc5ac7f22db722c7514a52acf8b661ea"}
Message was sent while issue was closed.
Description was changed from ========== Set the same headers for data URLs in WebURLLoaderImpl and ResourceFetcher Response headers are appended by net::URLRequestDataJob::BuildResponse() when WebURLLoaderImpl returns data URL response in a renderer process, but not when ResourceFetcher returns data URL response synchronously by ResourceFetcher::resourceForStaticData(). This CL makes the response headers to be added in both cases, by making NetworkUtils::parseDataURL() (that is used from resourceForStaticData()) to call net::URLRequestDataJob::BuildResponse() and set response headers. BUG=704032 ========== to ========== Set the same headers for data URLs in WebURLLoaderImpl and ResourceFetcher Response headers are appended by net::URLRequestDataJob::BuildResponse() when WebURLLoaderImpl returns data URL response in a renderer process, but not when ResourceFetcher returns data URL response synchronously by ResourceFetcher::resourceForStaticData(). This CL makes the response headers to be added in both cases, by making NetworkUtils::parseDataURL() (that is used from resourceForStaticData()) to call net::URLRequestDataJob::BuildResponse() and set response headers. BUG=704032 Review-Url: https://codereview.chromium.org/2766583002 Cr-Commit-Position: refs/heads/master@{#459026} Committed: https://chromium.googlesource.com/chromium/src/+/5b0d721fcc5ac7f22db722c7514a... ==========
Message was sent while issue was closed.
Committed patchset #5 (id:80001) as https://chromium.googlesource.com/chromium/src/+/5b0d721fcc5ac7f22db722c7514a... |