Chromium Code Reviews| Index: net/http/http_response_headers.h |
| diff --git a/net/http/http_response_headers.h b/net/http/http_response_headers.h |
| index deba3b6d974fd45c42f20d8b7f94b14182d1573f..dabc10aefa0305585cdafcf4908121003c1a78dc 100644 |
| --- a/net/http/http_response_headers.h |
| +++ b/net/http/http_response_headers.h |
| @@ -26,6 +26,8 @@ class TimeDelta; |
| namespace net { |
| +class HttpByteRange; |
| + |
| // HttpResponseHeaders: parses and holds HTTP response headers. |
| class NET_EXPORT HttpResponseHeaders |
| : public base::RefCountedThreadSafe<HttpResponseHeaders> { |
| @@ -83,6 +85,14 @@ class NET_EXPORT HttpResponseHeaders |
| // not have any EOL). |
| void ReplaceStatusLine(const std::string& new_status); |
| + // Updates headers (Content-Length and Content-Range) in the |headers| to |
| + // include the right content length and range for |byte_range|. This also |
| + // updates HTTP status line if |replace_status_line| is true. It is not valid |
| + // to give invalid |byte_range|. |
|
mmenke
2014/03/06 18:18:48
This also doesn't work for suffix byte ranges, or
rvargas (doing something else)
2014/03/06 19:24:00
Maybe the right message is that byte_range should
kinuko
2014/03/07 05:05:14
I tried to improve the comment... I'm still learni
|
| + void UpdateWithNewRange(const HttpByteRange& byte_range, |
| + int64 resource_size, |
| + bool replace_status_line); |
| + |
| // Creates a normalized header string. The output will be formatted exactly |
| // like so: |
| // HTTP/<version> <status_code> <status_text>\n |