diff options
author | rvargas@google.com <rvargas@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-05-07 23:59:06 +0000 |
---|---|---|
committer | rvargas@google.com <rvargas@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-05-07 23:59:06 +0000 |
commit | ee80b0759ec23970dd3a3d3ec237c437c2f0769e (patch) | |
tree | 1eeef8e25312b7c20dfe7460d81fad1dc27ea5e3 /net/http/http_response_headers.cc | |
parent | 2190bda779c8d83b3c52024fe676e189af696ac0 (diff) | |
download | chromium_src-ee80b0759ec23970dd3a3d3ec237c437c2f0769e.zip chromium_src-ee80b0759ec23970dd3a3d3ec237c437c2f0769e.tar.gz chromium_src-ee80b0759ec23970dd3a3d3ec237c437c2f0769e.tar.bz2 |
Make sure that a null separates individual http headers when
we pickle them.
BUG=7945
TEST=unittest.
Review URL: http://codereview.chromium.org/113110
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@15601 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/http/http_response_headers.cc')
-rw-r--r-- | net/http/http_response_headers.cc | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/net/http/http_response_headers.cc b/net/http/http_response_headers.cc index 59bd854..fb647ac 100644 --- a/net/http/http_response_headers.cc +++ b/net/http/http_response_headers.cc @@ -141,8 +141,9 @@ void HttpResponseHeaders::Persist(Pickle* pickle, PersistOptions options) { StringToLowerASCII(&header_name); if (filter_headers.find(header_name) == filter_headers.end()) { - // Includes terminator null due to the + 1. - blob.append(parsed_[i].name_begin, parsed_[k].value_end + 1); + // Make sure there is a null after the value. + blob.append(parsed_[i].name_begin, parsed_[k].value_end); + blob.push_back('\0'); } i = k; |