[email protected] | 3b63f8f4 | 2011-03-28 01:54:15 | [diff] [blame] | 1 | // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
license.bot | bf09a50 | 2008-08-24 00:55:55 | [diff] [blame] | 2 | // Use of this source code is governed by a BSD-style license that can be |
| 3 | // found in the LICENSE file. |
initial.commit | 586acc5fe | 2008-07-26 22:42:52 | [diff] [blame] | 4 | |
[email protected] | e2a2309 | 2009-03-17 15:35:18 | [diff] [blame] | 5 | #ifndef NET_HTTP_HTTP_RESPONSE_HEADERS_H_ |
| 6 | #define NET_HTTP_HTTP_RESPONSE_HEADERS_H_ |
[email protected] | 32b76ef | 2010-07-26 23:08:24 | [diff] [blame] | 7 | #pragma once |
initial.commit | 586acc5fe | 2008-07-26 22:42:52 | [diff] [blame] | 8 | |
initial.commit | 586acc5fe | 2008-07-26 22:42:52 | [diff] [blame] | 9 | #include <string> |
| 10 | #include <vector> |
| 11 | |
| 12 | #include "base/basictypes.h" |
[email protected] | 8a2a25f | 2008-08-19 23:06:05 | [diff] [blame] | 13 | #include "base/hash_tables.h" |
[email protected] | 3b63f8f4 | 2011-03-28 01:54:15 | [diff] [blame] | 14 | #include "base/memory/ref_counted.h" |
[email protected] | 231d5a3 | 2008-09-13 00:45:27 | [diff] [blame] | 15 | #include "net/http/http_version.h" |
initial.commit | 586acc5fe | 2008-07-26 22:42:52 | [diff] [blame] | 16 | |
| 17 | class Pickle; |
[email protected] | e1acf6f | 2008-10-27 20:43:33 | [diff] [blame] | 18 | |
| 19 | namespace base { |
initial.commit | 586acc5fe | 2008-07-26 22:42:52 | [diff] [blame] | 20 | class Time; |
| 21 | class TimeDelta; |
[email protected] | e1acf6f | 2008-10-27 20:43:33 | [diff] [blame] | 22 | } |
initial.commit | 586acc5fe | 2008-07-26 22:42:52 | [diff] [blame] | 23 | |
| 24 | namespace net { |
| 25 | |
| 26 | // HttpResponseHeaders: parses and holds HTTP response headers. |
[email protected] | 7eab0d226 | 2009-10-14 22:05:54 | [diff] [blame] | 27 | class HttpResponseHeaders |
| 28 | : public base::RefCountedThreadSafe<HttpResponseHeaders> { |
initial.commit | 586acc5fe | 2008-07-26 22:42:52 | [diff] [blame] | 29 | public: |
[email protected] | 4b3c95dd | 2011-01-07 23:02:11 | [diff] [blame] | 30 | // Persist options. |
| 31 | typedef int PersistOptions; |
| 32 | static const PersistOptions PERSIST_RAW = -1; // Raw, unparsed headers. |
| 33 | static const PersistOptions PERSIST_ALL = 0; // Parsed headers. |
| 34 | static const PersistOptions PERSIST_SANS_COOKIES = 1 << 0; |
| 35 | static const PersistOptions PERSIST_SANS_CHALLENGES = 1 << 1; |
| 36 | static const PersistOptions PERSIST_SANS_HOP_BY_HOP = 1 << 2; |
| 37 | static const PersistOptions PERSIST_SANS_NON_CACHEABLE = 1 << 3; |
| 38 | static const PersistOptions PERSIST_SANS_RANGES = 1 << 4; |
| 39 | |
initial.commit | 586acc5fe | 2008-07-26 22:42:52 | [diff] [blame] | 40 | // Parses the given raw_headers. raw_headers should be formatted thus: |
| 41 | // includes the http status response line, each line is \0-terminated, and |
| 42 | // it's terminated by an empty line (ie, 2 \0s in a row). |
[email protected] | 036d877 | 2008-09-06 01:00:53 | [diff] [blame] | 43 | // (Note that line continuations should have already been joined; |
| 44 | // see HttpUtil::AssembleRawHeaders) |
initial.commit | 586acc5fe | 2008-07-26 22:42:52 | [diff] [blame] | 45 | // |
| 46 | // NOTE: For now, raw_headers is not really 'raw' in that this constructor is |
| 47 | // called with a 'NativeMB' string on Windows because WinHTTP does not allow |
| 48 | // us to access the raw byte sequence as sent by a web server. In any case, |
| 49 | // HttpResponseHeaders does not perform any encoding changes on the input. |
| 50 | // |
| 51 | explicit HttpResponseHeaders(const std::string& raw_headers); |
| 52 | |
| 53 | // Initializes from the representation stored in the given pickle. The data |
| 54 | // for this object is found relative to the given pickle_iter, which should |
| 55 | // be passed to the pickle's various Read* methods. |
| 56 | HttpResponseHeaders(const Pickle& pickle, void** pickle_iter); |
| 57 | |
[email protected] | cd5b9a73 | 2008-11-20 08:14:39 | [diff] [blame] | 58 | // Appends a representation of this object to the given pickle. |
| 59 | // The options argument can be a combination of PersistOptions. |
| 60 | void Persist(Pickle* pickle, PersistOptions options); |
initial.commit | 586acc5fe | 2008-07-26 22:42:52 | [diff] [blame] | 61 | |
| 62 | // Performs header merging as described in 13.5.3 of RFC 2616. |
| 63 | void Update(const HttpResponseHeaders& new_headers); |
| 64 | |
[email protected] | 95792eb1 | 2009-06-22 21:30:40 | [diff] [blame] | 65 | // Removes all instances of a particular header. |
| 66 | void RemoveHeader(const std::string& name); |
| 67 | |
| 68 | // Adds a particular header. |header| has to be a single header without any |
| 69 | // EOL termination, just [<header-name>: <header-values>] |
| 70 | // If a header with the same name is already stored, the two headers are not |
| 71 | // merged together by this method; the one provided is simply put at the |
| 72 | // end of the list. |
| 73 | void AddHeader(const std::string& header); |
| 74 | |
[email protected] | 44f873a6 | 2009-08-12 00:14:48 | [diff] [blame] | 75 | // Replaces the current status line with the provided one (|new_status| should |
| 76 | // not have any EOL). |
| 77 | void ReplaceStatusLine(const std::string& new_status); |
| 78 | |
initial.commit | 586acc5fe | 2008-07-26 22:42:52 | [diff] [blame] | 79 | // Creates a normalized header string. The output will be formatted exactly |
| 80 | // like so: |
| 81 | // HTTP/<version> <status_code> <status_text>\n |
| 82 | // [<header-name>: <header-values>\n]* |
| 83 | // meaning, each line is \n-terminated, and there is no extra whitespace |
| 84 | // beyond the single space separators shown (of course, values can contain |
| 85 | // whitespace within them). If a given header-name appears more than once |
| 86 | // in the set of headers, they are combined into a single line like so: |
| 87 | // <header-name>: <header-value1>, <header-value2>, ...<header-valueN>\n |
| 88 | // |
| 89 | // DANGER: For some headers (e.g., "Set-Cookie"), the normalized form can be |
| 90 | // a lossy format. This is due to the fact that some servers generate |
| 91 | // Set-Cookie headers that contain unquoted commas (usually as part of the |
| 92 | // value of an "expires" attribute). So, use this function with caution. Do |
| 93 | // not expect to be able to re-parse Set-Cookie headers from this output. |
| 94 | // |
| 95 | // NOTE: Do not make any assumptions about the encoding of this output |
| 96 | // string. It may be non-ASCII, and the encoding used by the server is not |
| 97 | // necessarily known to us. Do not assume that this output is UTF-8! |
| 98 | // |
| 99 | // TODO(darin): remove this method |
| 100 | // |
| 101 | void GetNormalizedHeaders(std::string* output) const; |
| 102 | |
| 103 | // Fetch the "normalized" value of a single header, where all values for the |
| 104 | // header name are separated by commas. See the GetNormalizedHeaders for |
| 105 | // format details. Returns false if this header wasn't found. |
| 106 | // |
| 107 | // NOTE: Do not make any assumptions about the encoding of this output |
| 108 | // string. It may be non-ASCII, and the encoding used by the server is not |
| 109 | // necessarily known to us. Do not assume that this output is UTF-8! |
| 110 | // |
| 111 | // TODO(darin): remove this method |
| 112 | // |
| 113 | bool GetNormalizedHeader(const std::string& name, std::string* value) const; |
| 114 | |
| 115 | // Returns the normalized status line. For HTTP/0.9 responses (i.e., |
| 116 | // responses that lack a status line), this is the manufactured string |
| 117 | // "HTTP/0.9 200 OK". |
| 118 | std::string GetStatusLine() const; |
| 119 | |
[email protected] | 231d5a3 | 2008-09-13 00:45:27 | [diff] [blame] | 120 | // Get the HTTP version of the normalized status line. |
| 121 | HttpVersion GetHttpVersion() const { |
| 122 | return http_version_; |
| 123 | } |
| 124 | |
| 125 | // Get the HTTP version determined while parsing; or (0,0) if parsing failed |
| 126 | HttpVersion GetParsedHttpVersion() const { |
| 127 | return parsed_http_version_; |
| 128 | } |
| 129 | |
| 130 | // Get the HTTP status text of the normalized status line. |
| 131 | std::string GetStatusText() const; |
| 132 | |
initial.commit | 586acc5fe | 2008-07-26 22:42:52 | [diff] [blame] | 133 | // Enumerate the "lines" of the response headers. This skips over the status |
| 134 | // line. Use GetStatusLine if you are interested in that. Note that this |
| 135 | // method returns the un-coalesced response header lines, so if a response |
| 136 | // header appears on multiple lines, then it will appear multiple times in |
| 137 | // this enumeration (in the order the header lines were received from the |
[email protected] | 2adf288 | 2010-09-27 08:30:37 | [diff] [blame] | 138 | // server). Also, a given header might have an empty value. Initialize a |
| 139 | // 'void*' variable to NULL and pass it by address to EnumerateHeaderLines. |
| 140 | // Call EnumerateHeaderLines repeatedly until it returns false. The |
| 141 | // out-params 'name' and 'value' are set upon success. |
initial.commit | 586acc5fe | 2008-07-26 22:42:52 | [diff] [blame] | 142 | bool EnumerateHeaderLines(void** iter, |
| 143 | std::string* name, |
| 144 | std::string* value) const; |
| 145 | |
| 146 | // Enumerate the values of the specified header. If you are only interested |
| 147 | // in the first header, then you can pass NULL for the 'iter' parameter. |
| 148 | // Otherwise, to iterate across all values for the specified header, |
| 149 | // initialize a 'void*' variable to NULL and pass it by address to |
[email protected] | 2adf288 | 2010-09-27 08:30:37 | [diff] [blame] | 150 | // EnumerateHeader. Note that a header might have an empty value. Call |
| 151 | // EnumerateHeader repeatedly until it returns false. |
initial.commit | 586acc5fe | 2008-07-26 22:42:52 | [diff] [blame] | 152 | bool EnumerateHeader(void** iter, |
| 153 | const std::string& name, |
| 154 | std::string* value) const; |
| 155 | |
| 156 | // Returns true if the response contains the specified header-value pair. |
| 157 | // Both name and value are compared case insensitively. |
| 158 | bool HasHeaderValue(const std::string& name, const std::string& value) const; |
| 159 | |
[email protected] | 3f662f1 | 2010-03-25 19:56:12 | [diff] [blame] | 160 | // Returns true if the response contains the specified header. |
| 161 | // The name is compared case insensitively. |
| 162 | bool HasHeader(const std::string& name) const; |
| 163 | |
initial.commit | 586acc5fe | 2008-07-26 22:42:52 | [diff] [blame] | 164 | // Get the mime type and charset values in lower case form from the headers. |
| 165 | // Empty strings are returned if the values are not present. |
| 166 | void GetMimeTypeAndCharset(std::string* mime_type, |
| 167 | std::string* charset) const; |
| 168 | |
| 169 | // Get the mime type in lower case from the headers. If there's no mime |
| 170 | // type, returns false. |
| 171 | bool GetMimeType(std::string* mime_type) const; |
| 172 | |
| 173 | // Get the charset in lower case from the headers. If there's no charset, |
| 174 | // returns false. |
| 175 | bool GetCharset(std::string* charset) const; |
| 176 | |
| 177 | // Returns true if this response corresponds to a redirect. The target |
| 178 | // location of the redirect is optionally returned if location is non-null. |
| 179 | bool IsRedirect(std::string* location) const; |
| 180 | |
[email protected] | 86de13d | 2009-11-24 01:21:35 | [diff] [blame] | 181 | // Returns true if the HTTP response code passed in corresponds to a |
| 182 | // redirect. |
| 183 | static bool IsRedirectResponseCode(int response_code); |
| 184 | |
initial.commit | 586acc5fe | 2008-07-26 22:42:52 | [diff] [blame] | 185 | // Returns true if the response cannot be reused without validation. The |
| 186 | // result is relative to the current_time parameter, which is a parameter to |
| 187 | // support unit testing. The request_time parameter indicates the time at |
| 188 | // which the request was made that resulted in this response, which was |
| 189 | // received at response_time. |
[email protected] | e1acf6f | 2008-10-27 20:43:33 | [diff] [blame] | 190 | bool RequiresValidation(const base::Time& request_time, |
| 191 | const base::Time& response_time, |
| 192 | const base::Time& current_time) const; |
initial.commit | 586acc5fe | 2008-07-26 22:42:52 | [diff] [blame] | 193 | |
| 194 | // Returns the amount of time the server claims the response is fresh from |
| 195 | // the time the response was generated. See section 13.2.4 of RFC 2616. See |
| 196 | // RequiresValidation for a description of the response_time parameter. |
[email protected] | e1acf6f | 2008-10-27 20:43:33 | [diff] [blame] | 197 | base::TimeDelta GetFreshnessLifetime(const base::Time& response_time) const; |
initial.commit | 586acc5fe | 2008-07-26 22:42:52 | [diff] [blame] | 198 | |
| 199 | // Returns the age of the response. See section 13.2.3 of RFC 2616. |
| 200 | // See RequiresValidation for a description of this method's parameters. |
[email protected] | e1acf6f | 2008-10-27 20:43:33 | [diff] [blame] | 201 | base::TimeDelta GetCurrentAge(const base::Time& request_time, |
| 202 | const base::Time& response_time, |
| 203 | const base::Time& current_time) const; |
initial.commit | 586acc5fe | 2008-07-26 22:42:52 | [diff] [blame] | 204 | |
| 205 | // The following methods extract values from the response headers. If a |
| 206 | // value is not present, then false is returned. Otherwise, true is returned |
| 207 | // and the out param is assigned to the corresponding value. |
[email protected] | e1acf6f | 2008-10-27 20:43:33 | [diff] [blame] | 208 | bool GetMaxAgeValue(base::TimeDelta* value) const; |
| 209 | bool GetAgeValue(base::TimeDelta* value) const; |
| 210 | bool GetDateValue(base::Time* value) const; |
| 211 | bool GetLastModifiedValue(base::Time* value) const; |
| 212 | bool GetExpiresValue(base::Time* value) const; |
initial.commit | 586acc5fe | 2008-07-26 22:42:52 | [diff] [blame] | 213 | |
| 214 | // Extracts the time value of a particular header. This method looks for the |
| 215 | // first matching header value and parses its value as a HTTP-date. |
[email protected] | e1acf6f | 2008-10-27 20:43:33 | [diff] [blame] | 216 | bool GetTimeValuedHeader(const std::string& name, base::Time* result) const; |
initial.commit | 586acc5fe | 2008-07-26 22:42:52 | [diff] [blame] | 217 | |
| 218 | // Determines if this response indicates a keep-alive connection. |
| 219 | bool IsKeepAlive() const; |
| 220 | |
[email protected] | dbd39fb | 2010-01-08 01:13:36 | [diff] [blame] | 221 | // Returns true if this response has a strong etag or last-modified header. |
| 222 | // See section 13.3.3 of RFC 2616. |
| 223 | bool HasStrongValidators() const; |
| 224 | |
initial.commit | 586acc5fe | 2008-07-26 22:42:52 | [diff] [blame] | 225 | // Extracts the value of the Content-Length header or returns -1 if there is |
| 226 | // no such header in the response. |
| 227 | int64 GetContentLength() const; |
| 228 | |
[email protected] | 7eab0d226 | 2009-10-14 22:05:54 | [diff] [blame] | 229 | // Extracts the values in a Content-Range header and returns true if they are |
| 230 | // valid for a 206 response; otherwise returns false. |
[email protected] | d807bf9 | 2009-04-22 20:38:07 | [diff] [blame] | 231 | // The following values will be outputted: |
| 232 | // |*first_byte_position| = inclusive position of the first byte of the range |
| 233 | // |*last_byte_position| = inclusive position of the last byte of the range |
| 234 | // |*instance_length| = size in bytes of the object requested |
| 235 | // If any of the above values is unknown, its value will be -1. |
| 236 | bool GetContentRange(int64* first_byte_position, |
| 237 | int64* last_byte_position, |
| 238 | int64* instance_length) const; |
| 239 | |
initial.commit | 586acc5fe | 2008-07-26 22:42:52 | [diff] [blame] | 240 | // Returns the HTTP response code. This is 0 if the response code text seems |
| 241 | // to exist but could not be parsed. Otherwise, it defaults to 200 if the |
| 242 | // response code is not found in the raw headers. |
| 243 | int response_code() const { return response_code_; } |
| 244 | |
| 245 | // Returns the raw header string. |
| 246 | const std::string& raw_headers() const { return raw_headers_; } |
| 247 | |
| 248 | private: |
[email protected] | 8a2a25f | 2008-08-19 23:06:05 | [diff] [blame] | 249 | friend class base::RefCountedThreadSafe<HttpResponseHeaders>; |
initial.commit | 586acc5fe | 2008-07-26 22:42:52 | [diff] [blame] | 250 | |
[email protected] | 95792eb1 | 2009-06-22 21:30:40 | [diff] [blame] | 251 | typedef base::hash_set<std::string> HeaderSet; |
| 252 | |
[email protected] | 4b3c95dd | 2011-01-07 23:02:11 | [diff] [blame] | 253 | // The members of this structure point into raw_headers_. |
[email protected] | f48b943 | 2011-01-11 07:25:40 | [diff] [blame] | 254 | struct ParsedHeader; |
[email protected] | 4b3c95dd | 2011-01-07 23:02:11 | [diff] [blame] | 255 | typedef std::vector<ParsedHeader> HeaderList; |
| 256 | |
[email protected] | 9349cfb | 2010-08-31 18:00:53 | [diff] [blame] | 257 | HttpResponseHeaders(); |
| 258 | ~HttpResponseHeaders(); |
initial.commit | 586acc5fe | 2008-07-26 22:42:52 | [diff] [blame] | 259 | |
| 260 | // Initializes from the given raw headers. |
| 261 | void Parse(const std::string& raw_input); |
| 262 | |
| 263 | // Helper function for ParseStatusLine. |
| 264 | // Tries to extract the "HTTP/X.Y" from a status line formatted like: |
| 265 | // HTTP/1.1 200 OK |
| 266 | // with line_begin and end pointing at the begin and end of this line. If the |
[email protected] | 231d5a3 | 2008-09-13 00:45:27 | [diff] [blame] | 267 | // status line is malformed, returns HttpVersion(0,0). |
| 268 | static HttpVersion ParseVersion(std::string::const_iterator line_begin, |
| 269 | std::string::const_iterator line_end); |
initial.commit | 586acc5fe | 2008-07-26 22:42:52 | [diff] [blame] | 270 | |
| 271 | // Tries to extract the status line from a header block, given the first |
[email protected] | 72d1e59 | 2009-03-10 17:39:46 | [diff] [blame] | 272 | // line of said header block. If the status line is malformed, we'll |
| 273 | // construct a valid one. Example input: |
initial.commit | 586acc5fe | 2008-07-26 22:42:52 | [diff] [blame] | 274 | // HTTP/1.1 200 OK |
| 275 | // with line_begin and end pointing at the begin and end of this line. |
| 276 | // Output will be a normalized version of this, with a trailing \n. |
| 277 | void ParseStatusLine(std::string::const_iterator line_begin, |
[email protected] | 231d5a3 | 2008-09-13 00:45:27 | [diff] [blame] | 278 | std::string::const_iterator line_end, |
| 279 | bool has_headers); |
initial.commit | 586acc5fe | 2008-07-26 22:42:52 | [diff] [blame] | 280 | |
initial.commit | 586acc5fe | 2008-07-26 22:42:52 | [diff] [blame] | 281 | // Find the header in our list (case-insensitive) starting with parsed_ at |
| 282 | // index |from|. Returns string::npos if not found. |
| 283 | size_t FindHeader(size_t from, const std::string& name) const; |
| 284 | |
[email protected] | 79867b59 | 2008-08-21 21:23:52 | [diff] [blame] | 285 | // Add a header->value pair to our list. If we already have header in our |
| 286 | // list, append the value to it. |
initial.commit | 586acc5fe | 2008-07-26 22:42:52 | [diff] [blame] | 287 | void AddHeader(std::string::const_iterator name_begin, |
| 288 | std::string::const_iterator name_end, |
| 289 | std::string::const_iterator value_begin, |
| 290 | std::string::const_iterator value_end); |
| 291 | |
| 292 | // Add to parsed_ given the fields of a ParsedHeader object. |
| 293 | void AddToParsed(std::string::const_iterator name_begin, |
| 294 | std::string::const_iterator name_end, |
| 295 | std::string::const_iterator value_begin, |
| 296 | std::string::const_iterator value_end); |
| 297 | |
[email protected] | 95792eb1 | 2009-06-22 21:30:40 | [diff] [blame] | 298 | // Replaces the current headers with the merged version of |raw_headers| and |
| 299 | // the current headers without the headers in |headers_to_remove|. Note that |
| 300 | // |headers_to_remove| are removed from the current headers (before the |
| 301 | // merge), not after the merge. |
| 302 | void MergeWithHeaders(const std::string& raw_headers, |
| 303 | const HeaderSet& headers_to_remove); |
initial.commit | 586acc5fe | 2008-07-26 22:42:52 | [diff] [blame] | 304 | |
[email protected] | cd5b9a73 | 2008-11-20 08:14:39 | [diff] [blame] | 305 | // Adds the values from any 'cache-control: no-cache="foo,bar"' headers. |
| 306 | void AddNonCacheableHeaders(HeaderSet* header_names) const; |
| 307 | |
| 308 | // Adds the set of header names that contain cookie values. |
| 309 | static void AddSensitiveHeaders(HeaderSet* header_names); |
| 310 | |
| 311 | // Adds the set of rfc2616 hop-by-hop response headers. |
| 312 | static void AddHopByHopHeaders(HeaderSet* header_names); |
| 313 | |
| 314 | // Adds the set of challenge response headers. |
| 315 | static void AddChallengeHeaders(HeaderSet* header_names); |
| 316 | |
| 317 | // Adds the set of cookie response headers. |
| 318 | static void AddCookieHeaders(HeaderSet* header_names); |
initial.commit | 586acc5fe | 2008-07-26 22:42:52 | [diff] [blame] | 319 | |
[email protected] | 8bf26f49a | 2009-06-12 17:35:50 | [diff] [blame] | 320 | // Adds the set of content range response headers. |
| 321 | static void AddHopContentRangeHeaders(HeaderSet* header_names); |
| 322 | |
initial.commit | 586acc5fe | 2008-07-26 22:42:52 | [diff] [blame] | 323 | // We keep a list of ParsedHeader objects. These tell us where to locate the |
| 324 | // header-value pairs within raw_headers_. |
| 325 | HeaderList parsed_; |
| 326 | |
| 327 | // The raw_headers_ consists of the normalized status line (terminated with a |
| 328 | // null byte) and then followed by the raw null-terminated headers from the |
[email protected] | 036d877 | 2008-09-06 01:00:53 | [diff] [blame] | 329 | // input that was passed to our constructor. We preserve the input [*] to |
initial.commit | 586acc5fe | 2008-07-26 22:42:52 | [diff] [blame] | 330 | // maintain as much ancillary fidelity as possible (since it is sometimes |
| 331 | // hard to tell what may matter down-stream to a consumer of XMLHttpRequest). |
[email protected] | 036d877 | 2008-09-06 01:00:53 | [diff] [blame] | 332 | // [*] The status line may be modified. |
initial.commit | 586acc5fe | 2008-07-26 22:42:52 | [diff] [blame] | 333 | std::string raw_headers_; |
| 334 | |
| 335 | // This is the parsed HTTP response code. |
| 336 | int response_code_; |
| 337 | |
[email protected] | 231d5a3 | 2008-09-13 00:45:27 | [diff] [blame] | 338 | // The normalized http version (consistent with what GetStatusLine() returns). |
| 339 | HttpVersion http_version_; |
| 340 | |
| 341 | // The parsed http version number (not normalized). |
| 342 | HttpVersion parsed_http_version_; |
| 343 | |
[email protected] | 8a2a25f | 2008-08-19 23:06:05 | [diff] [blame] | 344 | DISALLOW_COPY_AND_ASSIGN(HttpResponseHeaders); |
initial.commit | 586acc5fe | 2008-07-26 22:42:52 | [diff] [blame] | 345 | }; |
| 346 | |
| 347 | } // namespace net |
| 348 | |
[email protected] | e2a2309 | 2009-03-17 15:35:18 | [diff] [blame] | 349 | #endif // NET_HTTP_HTTP_RESPONSE_HEADERS_H_ |