| OLD | NEW |
| 1 // Copyright (c) 2006-2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2009 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef NET_HTTP_HTTP_RESPONSE_HEADERS_H_ | 5 #ifndef NET_HTTP_HTTP_RESPONSE_HEADERS_H_ |
| 6 #define NET_HTTP_HTTP_RESPONSE_HEADERS_H_ | 6 #define NET_HTTP_HTTP_RESPONSE_HEADERS_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 204 bool GetLastModifiedValue(base::Time* value) const; | 204 bool GetLastModifiedValue(base::Time* value) const; |
| 205 bool GetExpiresValue(base::Time* value) const; | 205 bool GetExpiresValue(base::Time* value) const; |
| 206 | 206 |
| 207 // Extracts the time value of a particular header. This method looks for the | 207 // Extracts the time value of a particular header. This method looks for the |
| 208 // first matching header value and parses its value as a HTTP-date. | 208 // first matching header value and parses its value as a HTTP-date. |
| 209 bool GetTimeValuedHeader(const std::string& name, base::Time* result) const; | 209 bool GetTimeValuedHeader(const std::string& name, base::Time* result) const; |
| 210 | 210 |
| 211 // Determines if this response indicates a keep-alive connection. | 211 // Determines if this response indicates a keep-alive connection. |
| 212 bool IsKeepAlive() const; | 212 bool IsKeepAlive() const; |
| 213 | 213 |
| 214 // Returns true if this response has a strong etag or last-modified header. |
| 215 // See section 13.3.3 of RFC 2616. |
| 216 bool HasStrongValidators() const; |
| 217 |
| 214 // Extracts the value of the Content-Length header or returns -1 if there is | 218 // Extracts the value of the Content-Length header or returns -1 if there is |
| 215 // no such header in the response. | 219 // no such header in the response. |
| 216 int64 GetContentLength() const; | 220 int64 GetContentLength() const; |
| 217 | 221 |
| 218 // Extracts the values in a Content-Range header and returns true if they are | 222 // Extracts the values in a Content-Range header and returns true if they are |
| 219 // valid for a 206 response; otherwise returns false. | 223 // valid for a 206 response; otherwise returns false. |
| 220 // The following values will be outputted: | 224 // The following values will be outputted: |
| 221 // |*first_byte_position| = inclusive position of the first byte of the range | 225 // |*first_byte_position| = inclusive position of the first byte of the range |
| 222 // |*last_byte_position| = inclusive position of the last byte of the range | 226 // |*last_byte_position| = inclusive position of the last byte of the range |
| 223 // |*instance_length| = size in bytes of the object requested | 227 // |*instance_length| = size in bytes of the object requested |
| (...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 338 | 342 |
| 339 // The parsed http version number (not normalized). | 343 // The parsed http version number (not normalized). |
| 340 HttpVersion parsed_http_version_; | 344 HttpVersion parsed_http_version_; |
| 341 | 345 |
| 342 DISALLOW_COPY_AND_ASSIGN(HttpResponseHeaders); | 346 DISALLOW_COPY_AND_ASSIGN(HttpResponseHeaders); |
| 343 }; | 347 }; |
| 344 | 348 |
| 345 } // namespace net | 349 } // namespace net |
| 346 | 350 |
| 347 #endif // NET_HTTP_HTTP_RESPONSE_HEADERS_H_ | 351 #endif // NET_HTTP_HTTP_RESPONSE_HEADERS_H_ |
| OLD | NEW |