Chromium Code Reviews
DescriptionCleaned 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 #
Messages
Total messages: 26 (12 generated)
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||