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

Issue 2549143003: Cleaned up the API of HttpUtil::ParseContentRangeHeader(). (Closed)

Created:
4 years ago by sclittle
Modified:
4 years ago
CC:
chromium-reviews, cbentzel+watch_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Cleaned up the API of HttpUtil::ParseContentRangeHeader(). HttpUtil::ParseContentRangeHeader() is used to validate and extract values from a Content-Range header for a 206 response. Before this CL, ParseContentRangeHeader() also had partial support for extracting values from a Content-Range header for a 416 response, without validating the returned values. This behavior didn't appear to be used by any production code, so this CL removes that support and makes ParseContentRangeHeader return true only if all three of |first_byte_position|, |last_byte_position|, and |instance_length| are specified and valid for a 206 response; otherwise, all outputs are set to -1 and returns false. BUG=670913 Committed: https://crrev.com/d43b2fbe1d074927d76c6fa6fb7e4cd816b8527a Cr-Commit-Position: refs/heads/master@{#439305}

Patch Set 1 : Initial patch set #

Total comments: 3

Patch Set 2 : Changed method name to GetContentRangeFor206 #

Patch Set 3 : Fixed unittest #

Unified diffs Side-by-side diffs Delta from patch set Stats (+75 lines, -184 lines) Patch
M chrome/browser/extensions/blob_reader.cc View 1 1 chunk +1 line, -1 line 0 comments Download
M content/browser/appcache/appcache_url_request_job_unittest.cc View 1 1 chunk +1 line, -1 line 0 comments Download
M content/browser/blob_storage/blob_url_request_job_unittest.cc View 1 3 chunks +6 lines, -6 lines 0 comments Download
M content/browser/download/download_request_core.cc View 1 1 chunk +1 line, -1 line 0 comments Download
M net/http/http_cache_unittest.cc View 1 2 1 chunk +1 line, -1 line 0 comments Download
M net/http/http_response_headers.h View 1 1 chunk +6 lines, -6 lines 0 comments Download
M net/http/http_response_headers.cc View 1 2 chunks +7 lines, -6 lines 0 comments Download
M net/http/http_response_headers_unittest.cc View 1 3 chunks +4 lines, -88 lines 0 comments Download
M net/http/http_util.h View 1 2 1 chunk +8 lines, -10 lines 0 comments Download
M net/http/http_util.cc View 1 2 2 chunks +26 lines, -47 lines 0 comments Download
M net/http/http_util_unittest.cc View 1 2 1 chunk +13 lines, -16 lines 0 comments Download
M net/http/partial_data.cc View 1 1 chunk +1 line, -1 line 0 comments Download

Messages

Total messages: 26 (12 generated)
sclittle
4 years ago (2016-12-06 00:51:39 UTC) #4
mmenke
Looks good, just think we should rename the method, to make sure it's clear that ...
4 years ago (2016-12-06 19:18:06 UTC) #5
sclittle
benwells: extensions/* michaeln: appcache/* dmurph: blob_storage/* rdsmith: content/browser/download/* Thanks in advance! https://codereview.chromium.org/2549143003/diff/40001/net/http/http_response_headers.h File net/http/http_response_headers.h (right): ...
4 years ago (2016-12-08 20:37:56 UTC) #7
mmenke
Thanks so much! LGTM!
4 years ago (2016-12-08 20:38:58 UTC) #8
dmurph
lgtm
4 years ago (2016-12-08 20:59:36 UTC) #9
Randy Smith (Not in Mondays)
content/browser/download LGTM (based on previous review of change).
4 years ago (2016-12-08 21:03:41 UTC) #10
michaeln
appcache/* lgtm
4 years ago (2016-12-08 23:24:46 UTC) #11
sclittle
+mek for extensions/* -benwells
4 years ago (2016-12-14 00:17:57 UTC) #13
Marijn Kruisselbrink
On 2016/12/14 at 00:17:57, sclittle wrote: > +mek for extensions/* lgtm
4 years ago (2016-12-14 03:24:52 UTC) #14
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/2549143003/60001
4 years ago (2016-12-14 03:26:00 UTC) #16
commit-bot: I haz the power
Try jobs failed on following builders: ios-simulator on master.tryserver.chromium.mac (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.mac/builders/ios-simulator/builds/123747) ios-simulator-xcode-clang on master.tryserver.chromium.mac (JOB_FAILED, ...
4 years ago (2016-12-14 03:33:19 UTC) #18
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/2549143003/80001
4 years ago (2016-12-17 00:44:20 UTC) #21
commit-bot: I haz the power
Committed patchset #3 (id:80001)
4 years ago (2016-12-17 03:21:21 UTC) #24
commit-bot: I haz the power
4 years ago (2016-12-17 03:23:17 UTC) #26
Message was sent while issue was closed.
Patchset 3 (id:??) landed as
https://crrev.com/d43b2fbe1d074927d76c6fa6fb7e4cd816b8527a
Cr-Commit-Position: refs/heads/master@{#439305}

Powered by Google App Engine
This is Rietveld 408576698