OLD | NEW |
---|---|
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
58 // Appends a representation of this object to the given pickle. | 58 // Appends a representation of this object to the given pickle. |
59 // The options argument can be a combination of PersistOptions. | 59 // The options argument can be a combination of PersistOptions. |
60 void Persist(Pickle* pickle, PersistOptions options); | 60 void Persist(Pickle* pickle, PersistOptions options); |
61 | 61 |
62 // Performs header merging as described in 13.5.3 of RFC 2616. | 62 // Performs header merging as described in 13.5.3 of RFC 2616. |
63 void Update(const HttpResponseHeaders& new_headers); | 63 void Update(const HttpResponseHeaders& new_headers); |
64 | 64 |
65 // Removes all instances of a particular header. | 65 // Removes all instances of a particular header. |
66 void RemoveHeader(const std::string& name); | 66 void RemoveHeader(const std::string& name); |
67 | 67 |
68 // Removes a particular header. The header name is compared | 68 // Removes a particular header line. The header name is compared |
69 // case-insensitively. | 69 // case-insensitively. |
70 void RemoveHeaderWithValue(const std::string& name, const std::string& value); | 70 void RemoveHeaderLine(const std::string& name, const std::string& values); |
rvargas (doing something else)
2012/07/19 19:11:02
nit: I'm not sure about using plural for value...
battre
2012/07/23 13:31:11
Done.
| |
71 | 71 |
72 // Adds a particular header. |header| has to be a single header without any | 72 // Adds a particular header. |header| has to be a single header without any |
73 // EOL termination, just [<header-name>: <header-values>] | 73 // EOL termination, just [<header-name>: <header-values>] |
74 // If a header with the same name is already stored, the two headers are not | 74 // If a header with the same name is already stored, the two headers are not |
75 // merged together by this method; the one provided is simply put at the | 75 // merged together by this method; the one provided is simply put at the |
76 // end of the list. | 76 // end of the list. |
77 void AddHeader(const std::string& header); | 77 void AddHeader(const std::string& header); |
78 | 78 |
79 // Replaces the current status line with the provided one (|new_status| should | 79 // Replaces the current status line with the provided one (|new_status| should |
80 // not have any EOL). | 80 // not have any EOL). |
(...skipping 291 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
372 | 372 |
373 // The parsed http version number (not normalized). | 373 // The parsed http version number (not normalized). |
374 HttpVersion parsed_http_version_; | 374 HttpVersion parsed_http_version_; |
375 | 375 |
376 DISALLOW_COPY_AND_ASSIGN(HttpResponseHeaders); | 376 DISALLOW_COPY_AND_ASSIGN(HttpResponseHeaders); |
377 }; | 377 }; |
378 | 378 |
379 } // namespace net | 379 } // namespace net |
380 | 380 |
381 #endif // NET_HTTP_HTTP_RESPONSE_HEADERS_H_ | 381 #endif // NET_HTTP_HTTP_RESPONSE_HEADERS_H_ |
OLD | NEW |