[go: nahoru, domu]

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}
12 files changed