| Index: net/http/http_util.h
|
| diff --git a/net/http/http_util.h b/net/http/http_util.h
|
| index 79a41acd193cccddc4152fabb50e0760ba06b385..afc4e871cddf8c7dc75a35bba05b88e803e04a13 100644
|
| --- a/net/http/http_util.h
|
| +++ b/net/http/http_util.h
|
| @@ -29,14 +29,6 @@ class NET_EXPORT HttpUtil {
|
| // is stripped (username, password, reference).
|
| static std::string SpecForRequest(const GURL& url);
|
|
|
| - // Locates the next occurance of delimiter in line, skipping over quoted
|
| - // strings (e.g., commas will not be treated as delimiters if they appear
|
| - // within a quoted string). Returns the offset of the found delimiter or
|
| - // line.size() if no delimiter was found.
|
| - static size_t FindDelimiter(const std::string& line,
|
| - size_t search_start,
|
| - char delimiter);
|
| -
|
| // Parses the value of a Content-Type header. The resulting mime_type and
|
| // charset values are normalized to lowercase. The mime_type and charset
|
| // output values are only modified if the content_type_str contains a mime
|
| @@ -323,6 +315,16 @@ class NET_EXPORT HttpUtil {
|
| // calls to GetNext() or after the NameValuePairsIterator is destroyed.
|
| class NET_EXPORT NameValuePairsIterator {
|
| public:
|
| + // Whether or not values are optional. VALUES_OPTIONAL allows
|
| + // e.g. name1=value1;name2;name3=value3, whereas VALUES_NOT_OPTIONAL
|
| + // will treat it as a parse error because name2 does not have a
|
| + // corresponding equals sign. Default is VALUES_NOT_OPTIONAL.
|
| + enum OptionalValues { VALUES_OPTIONAL, VALUES_NOT_OPTIONAL };
|
| +
|
| + NameValuePairsIterator(std::string::const_iterator begin,
|
| + std::string::const_iterator end,
|
| + char delimiter,
|
| + OptionalValues optional_values);
|
| NameValuePairsIterator(std::string::const_iterator begin,
|
| std::string::const_iterator end,
|
| char delimiter);
|
| @@ -373,6 +375,10 @@ class NET_EXPORT HttpUtil {
|
| std::string unquoted_value_;
|
|
|
| bool value_is_quoted_;
|
| +
|
| + // True if values are required for each name/value pair; false if a
|
| + // name is permitted to appear without a corresponding value.
|
| + bool values_optional_;
|
| };
|
| };
|
|
|
|
|