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

Unified Diff: net/http/http_util.h

Issue 458: [new http] Normalize line continuations in response headers. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 12 years, 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/http/http_response_headers_unittest.cc ('k') | net/http/http_util.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/http/http_util.h
===================================================================
--- net/http/http_util.h (revision 1706)
+++ net/http/http_util.h (working copy)
@@ -46,6 +46,11 @@
return IsNonCoalescingHeader(name.begin(), name.end());
}
+ // Return true if the character is HTTP "linear white space" (SP | HT).
+ // This definition corresponds with the HTTP_LWS macro, and does not match
+ // newlines.
+ static bool IsLWS(char c);
+
// Trim HTTP_LWS chars from the beginning and end of the string.
static void TrimLWS(std::string::const_iterator* begin,
std::string::const_iterator* end);
@@ -66,6 +71,8 @@
// Used to iterate over the name/value pairs of HTTP headers. To iterate
// over the values in a multi-value header, use ValuesIterator.
+ // See AssembleRawHeaders for joining line continuations (this iterator
+ // does not expect any).
class HeadersIterator {
public:
HeadersIterator(std::string::const_iterator headers_begin,
« no previous file with comments | « net/http/http_response_headers_unittest.cc ('k') | net/http/http_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698