| Index: third_party/WebKit/Source/platform/network/HTTPParsers.h
|
| diff --git a/third_party/WebKit/Source/platform/network/HTTPParsers.h b/third_party/WebKit/Source/platform/network/HTTPParsers.h
|
| index 4eaf7f00a6cf11ccbd6d4e58db0e534a0e95193b..f6b2b5fd7c30773311618429cd73489ccf8e18c4 100644
|
| --- a/third_party/WebKit/Source/platform/network/HTTPParsers.h
|
| +++ b/third_party/WebKit/Source/platform/network/HTTPParsers.h
|
| @@ -39,6 +39,7 @@
|
| #include "wtf/Vector.h"
|
| #include "wtf/text/StringHash.h"
|
|
|
| +#include <stdint.h>
|
| #include <memory>
|
|
|
| namespace blink {
|
| @@ -158,6 +159,18 @@ PLATFORM_EXPORT bool parseMultipartHeadersFromBody(const char* bytes,
|
| PLATFORM_EXPORT std::unique_ptr<JSONArray> parseJSONHeader(const String& header,
|
| int maxParseDepth);
|
|
|
| +// Extracts the values in a Content-Range header and returns true if all three
|
| +// values are present and valid for a 206 response; otherwise returns false.
|
| +// The following values will be outputted:
|
| +// |*first_byte_position| = inclusive position of the first byte of the range
|
| +// |*last_byte_position| = inclusive position of the last byte of the range
|
| +// |*instance_length| = size in bytes of the object requested
|
| +// If this method returns false, then all of the outputs will be -1.
|
| +PLATFORM_EXPORT bool parseContentRangeHeaderFor206(const String& contentRange,
|
| + int64_t* firstBytePosition,
|
| + int64_t* lastBytePosition,
|
| + int64_t* instanceLength);
|
| +
|
| } // namespace blink
|
|
|
| #endif
|
|
|