Chromium Code Reviews| Index: net/http/http_util.h |
| diff --git a/net/http/http_util.h b/net/http/http_util.h |
| index ae65146e6e4a42a21f673787d037f06330c9eb0b..a48405012c6eebb6e2ba359f0efc6d5df3ad6c19 100644 |
| --- a/net/http/http_util.h |
| +++ b/net/http/http_util.h |
| @@ -21,6 +21,8 @@ |
| namespace net { |
| +class HttpResponseHeaders; |
| + |
| class NET_EXPORT HttpUtil { |
| public: |
| // Returns the absolute path of the URL, to be used for the http request. |
| @@ -66,6 +68,17 @@ class NET_EXPORT HttpUtil { |
| static bool ParseRangeHeader(const std::string& range_specifier, |
| std::vector<HttpByteRange>* ranges); |
| + // Updates Content-Length and Content-Range headers in the |headers| |
|
rvargas (doing something else)
2014/03/05 19:47:33
tiny nit: go as close to 80 columns as possible.
kinuko
2014/03/06 04:11:29
Done.
|
| + // to include the right content length and range for |byte_range|. |
| + // This also updates HTTP status line if |replace_status_line| is true. |
| + // |byte_range| must be valid, otherwise this returns false and does |
| + // not update |headers|. |
| + static bool UpdateResponseHeadersWithRange( |
|
rvargas (doing something else)
2014/03/05 19:47:33
Did you consider making this a member of ResponseH
kinuko
2014/03/06 04:11:29
Makes sense, I was worried that no other http util
|
| + const HttpByteRange& byte_range, |
| + int64 resource_size, |
| + bool replace_status_line, |
| + HttpResponseHeaders* headers); |
| + |
| // Scans the '\r\n'-delimited headers for the given header name. Returns |
| // true if a match is found. Input is assumed to be well-formed. |
| // TODO(darin): kill this |