Refactor and clean up the API of HttpResponseHeaders::GetContentRange() so that other components can more easily depend on it |
||
Issue descriptionCurrently, the API of GetContentRange() mainly supports validating and extracting values from a Content-Range response header for a 206 response, but it also has partial support for extracting values from Content-Range headers from 416 responses without validation. Nothing appears to use this 416 Content-Range support, so let's remove it and change the API of that method accordingly. The Content-Range header parsing logic should also be moved out of HttpResponseHeaders so that other components (e.g. third_party/WebKit) can more easily make use of it.
,
Dec 17 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/d43b2fbe1d074927d76c6fa6fb7e4cd816b8527a commit d43b2fbe1d074927d76c6fa6fb7e4cd816b8527a Author: sclittle <sclittle@chromium.org> Date: Sat Dec 17 03:20:47 2016 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 Review-Url: https://codereview.chromium.org/2549143003 Cr-Commit-Position: refs/heads/master@{#439305} [modify] https://crrev.com/d43b2fbe1d074927d76c6fa6fb7e4cd816b8527a/chrome/browser/extensions/blob_reader.cc [modify] https://crrev.com/d43b2fbe1d074927d76c6fa6fb7e4cd816b8527a/content/browser/appcache/appcache_url_request_job_unittest.cc [modify] https://crrev.com/d43b2fbe1d074927d76c6fa6fb7e4cd816b8527a/content/browser/blob_storage/blob_url_request_job_unittest.cc [modify] https://crrev.com/d43b2fbe1d074927d76c6fa6fb7e4cd816b8527a/content/browser/download/download_request_core.cc [modify] https://crrev.com/d43b2fbe1d074927d76c6fa6fb7e4cd816b8527a/net/http/http_cache_unittest.cc [modify] https://crrev.com/d43b2fbe1d074927d76c6fa6fb7e4cd816b8527a/net/http/http_response_headers.cc [modify] https://crrev.com/d43b2fbe1d074927d76c6fa6fb7e4cd816b8527a/net/http/http_response_headers.h [modify] https://crrev.com/d43b2fbe1d074927d76c6fa6fb7e4cd816b8527a/net/http/http_response_headers_unittest.cc [modify] https://crrev.com/d43b2fbe1d074927d76c6fa6fb7e4cd816b8527a/net/http/http_util.cc [modify] https://crrev.com/d43b2fbe1d074927d76c6fa6fb7e4cd816b8527a/net/http/http_util.h [modify] https://crrev.com/d43b2fbe1d074927d76c6fa6fb7e4cd816b8527a/net/http/http_util_unittest.cc [modify] https://crrev.com/d43b2fbe1d074927d76c6fa6fb7e4cd816b8527a/net/http/partial_data.cc
,
Dec 19 2016
|
||
►
Sign in to add a comment |
||
Comment 1 by bugdroid1@chromium.org
, Dec 3 2016