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

Unified Diff: net/http/http_util.h

Issue 2608563002: Remove some dead code for operating on headers-as-a-string. (Closed)
Patch Set: Fix typo Created 4 years 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 | « no previous file | 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
diff --git a/net/http/http_util.h b/net/http/http_util.h
index a0ee9bba79dfab0d366268deb740233e83f4e555..75cf51f56b54aa4c76c88e57cd9358e8f0354383 100644
--- a/net/http/http_util.h
+++ b/net/http/http_util.h
@@ -46,17 +46,9 @@ class NET_EXPORT HttpUtil {
bool* had_charset,
std::string* boundary);
- // Scans the headers and look for the first "Range" header in |headers|,
- // if "Range" exists and the first one of it is well formatted then returns
- // true, |ranges| will contain a list of valid ranges. If return
- // value is false then values in |ranges| should not be used. The format of
- // "Range" header is defined in RFC 7233 Section 2.1.
+ // Parses the value of a "Range" header as defined in RFC 7233 Section 2.1.
// https://tools.ietf.org/html/rfc7233#section-2.1
- static bool ParseRanges(const std::string& headers,
- std::vector<HttpByteRange>* ranges);
-
- // Same thing as ParseRanges except the Range header is known and its value
- // is directly passed in, rather than requiring searching through a string.
+ // Returns false on failure.
static bool ParseRangeHeader(const std::string& range_specifier,
std::vector<HttpByteRange>* ranges);
@@ -100,14 +92,6 @@ class NET_EXPORT HttpUtil {
// a fully RFC-2616-compliant header value validation.
static bool IsValidHeaderValue(const base::StringPiece& value);
- // Strips all header lines from |headers| whose name matches
- // |headers_to_remove|. |headers_to_remove| is a list of null-terminated
- // lower-case header names, with array length |headers_to_remove_len|.
- // Returns the stripped header lines list, separated by "\r\n".
- static std::string StripHeaders(const std::string& headers,
- const char* const headers_to_remove[],
- size_t headers_to_remove_len);
-
// Multiple occurances of some headers cannot be coalesced into a comma-
// separated list since their values are (or contain) unquoted HTTP-date
// values, which may contain a comma (see RFC 2616 section 3.3.1).
« no previous file with comments | « no previous file | net/http/http_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698