diff options
author | willchan@chromium.org <willchan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-03-29 22:02:47 +0000 |
---|---|---|
committer | willchan@chromium.org <willchan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-03-29 22:02:47 +0000 |
commit | 270c641ccd0cd589b8488c5123e5c5830ee10a0b (patch) | |
tree | cd0a3f192a7305e3c18e8a9edf5ed5d716476baf /base/string_util.h | |
parent | 11de360780b9cbb846161cd7c772cc26d6f29616 (diff) | |
download | chromium_src-270c641ccd0cd589b8488c5123e5c5830ee10a0b.zip chromium_src-270c641ccd0cd589b8488c5123e5c5830ee10a0b.tar.gz chromium_src-270c641ccd0cd589b8488c5123e5c5830ee10a0b.tar.bz2 |
Reland r42300: "HttpRequestHeaders refactor."
Adds a fix and tests for empty header values. The particular bug happened when the value was non-empty, but was all LWS, so it was effectively empty.
BUG=22588
Review URL: http://codereview.chromium.org/1370001
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@43000 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/string_util.h')
-rw-r--r-- | base/string_util.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/base/string_util.h b/base/string_util.h index 586c60c..28cd26f 100644 --- a/base/string_util.h +++ b/base/string_util.h @@ -575,6 +575,14 @@ void SplitStringDontTrim(const std::string& str, char s, std::vector<std::string>* r); +// The same as SplitString, but use a substring delimiter instead of a char. +void SplitStringUsingSubstr(const string16& str, + const string16& s, + std::vector<string16>* r); +void SplitStringUsingSubstr(const std::string& str, + const std::string& s, + std::vector<std::string>* r); + // Splits a string into its fields delimited by any of the characters in // |delimiters|. Each field is added to the |tokens| vector. Returns the // number of tokens found. |