Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1240)

Side by Side Diff: net/http/http_response_headers.h

Issue 118345: Http Cache: First pass of byte-range requests support.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « net/http/http_cache_unittest.cc ('k') | net/http/http_response_headers.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 HttpResponseHeaders(const Pickle& pickle, void** pickle_iter); 45 HttpResponseHeaders(const Pickle& pickle, void** pickle_iter);
46 46
47 // Persist options. 47 // Persist options.
48 typedef int PersistOptions; 48 typedef int PersistOptions;
49 static const PersistOptions PERSIST_RAW = -1; // Raw, unparsed headers. 49 static const PersistOptions PERSIST_RAW = -1; // Raw, unparsed headers.
50 static const PersistOptions PERSIST_ALL = 0; // Parsed headers. 50 static const PersistOptions PERSIST_ALL = 0; // Parsed headers.
51 static const PersistOptions PERSIST_SANS_COOKIES = 1 << 0; 51 static const PersistOptions PERSIST_SANS_COOKIES = 1 << 0;
52 static const PersistOptions PERSIST_SANS_CHALLENGES = 1 << 1; 52 static const PersistOptions PERSIST_SANS_CHALLENGES = 1 << 1;
53 static const PersistOptions PERSIST_SANS_HOP_BY_HOP = 1 << 2; 53 static const PersistOptions PERSIST_SANS_HOP_BY_HOP = 1 << 2;
54 static const PersistOptions PERSIST_SANS_NON_CACHEABLE = 1 << 3; 54 static const PersistOptions PERSIST_SANS_NON_CACHEABLE = 1 << 3;
55 static const PersistOptions PERSIST_SANS_RANGES = 1 << 4;
55 56
56 // Appends a representation of this object to the given pickle. 57 // Appends a representation of this object to the given pickle.
57 // The options argument can be a combination of PersistOptions. 58 // The options argument can be a combination of PersistOptions.
58 void Persist(Pickle* pickle, PersistOptions options); 59 void Persist(Pickle* pickle, PersistOptions options);
59 60
60 // Performs header merging as described in 13.5.3 of RFC 2616. 61 // Performs header merging as described in 13.5.3 of RFC 2616.
61 void Update(const HttpResponseHeaders& new_headers); 62 void Update(const HttpResponseHeaders& new_headers);
62 63
63 // Creates a normalized header string. The output will be formatted exactly 64 // Creates a normalized header string. The output will be formatted exactly
64 // like so: 65 // like so:
(...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after
269 270
270 // Adds the set of rfc2616 hop-by-hop response headers. 271 // Adds the set of rfc2616 hop-by-hop response headers.
271 static void AddHopByHopHeaders(HeaderSet* header_names); 272 static void AddHopByHopHeaders(HeaderSet* header_names);
272 273
273 // Adds the set of challenge response headers. 274 // Adds the set of challenge response headers.
274 static void AddChallengeHeaders(HeaderSet* header_names); 275 static void AddChallengeHeaders(HeaderSet* header_names);
275 276
276 // Adds the set of cookie response headers. 277 // Adds the set of cookie response headers.
277 static void AddCookieHeaders(HeaderSet* header_names); 278 static void AddCookieHeaders(HeaderSet* header_names);
278 279
280 // Adds the set of content range response headers.
281 static void AddHopContentRangeHeaders(HeaderSet* header_names);
282
279 // The members of this structure point into raw_headers_. 283 // The members of this structure point into raw_headers_.
280 struct ParsedHeader { 284 struct ParsedHeader {
281 std::string::const_iterator name_begin; 285 std::string::const_iterator name_begin;
282 std::string::const_iterator name_end; 286 std::string::const_iterator name_end;
283 std::string::const_iterator value_begin; 287 std::string::const_iterator value_begin;
284 std::string::const_iterator value_end; 288 std::string::const_iterator value_end;
285 289
286 // A header "continuation" contains only a subsequent value for the 290 // A header "continuation" contains only a subsequent value for the
287 // preceding header. (Header values are comma separated.) 291 // preceding header. (Header values are comma separated.)
288 bool is_continuation() const { return name_begin == name_end; } 292 bool is_continuation() const { return name_begin == name_end; }
(...skipping 20 matching lines...) Expand all
309 313
310 // The parsed http version number (not normalized). 314 // The parsed http version number (not normalized).
311 HttpVersion parsed_http_version_; 315 HttpVersion parsed_http_version_;
312 316
313 DISALLOW_COPY_AND_ASSIGN(HttpResponseHeaders); 317 DISALLOW_COPY_AND_ASSIGN(HttpResponseHeaders);
314 }; 318 };
315 319
316 } // namespace net 320 } // namespace net
317 321
318 #endif // NET_HTTP_HTTP_RESPONSE_HEADERS_H_ 322 #endif // NET_HTTP_HTTP_RESPONSE_HEADERS_H_
OLDNEW
« no previous file with comments | « net/http/http_cache_unittest.cc ('k') | net/http/http_response_headers.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698