diff options
author | mbelshe@chromium.org <mbelshe@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-03-08 18:50:37 +0000 |
---|---|---|
committer | mbelshe@chromium.org <mbelshe@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-03-08 18:50:37 +0000 |
commit | 2b432e1f7129272c2a461cb51cb082dc77193b09 (patch) | |
tree | a6b61608ffb05c04013f3b3c2522ac830b845580 /net/tools | |
parent | 3f51337919c8a7afd5fe1890ddc600e62bd938ac (diff) | |
download | chromium_src-2b432e1f7129272c2a461cb51cb082dc77193b09.zip chromium_src-2b432e1f7129272c2a461cb51cb082dc77193b09.tar.gz chromium_src-2b432e1f7129272c2a461cb51cb082dc77193b09.tar.bz2 |
2 Bug fixes:
- Set-Cookie delimiter was a comma, but should have been a NUL.
- Requests with query strings containing 'http://' caused request url paths
to be truncated.
Fix from Kevin Lindsay (kelindsay@gmail.com)
BUG=none
TEST=none
Review URL: http://codereview.chromium.org/6628084
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@77310 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/tools')
-rw-r--r-- | net/tools/flip_server/spdy_interface.cc | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/net/tools/flip_server/spdy_interface.cc b/net/tools/flip_server/spdy_interface.cc index 8136ebd..278f0dd 100644 --- a/net/tools/flip_server/spdy_interface.cc +++ b/net/tools/flip_server/spdy_interface.cc @@ -175,7 +175,15 @@ int SpdySM::SpdyHandleNewStream(const SpdyControlFrame* frame, *is_https_scheme = true; } - std::string uri = UrlUtilities::GetUrlPath(url->second); + // url->second here only ever seems to contain just the path. When this + // path contains a query string with a http:// in one of its values, + // UrlUtilities::GetUrlPath will fail and always return a / breaking + // the request. GetUrlPath assumes the absolute URL is being passed in. + std::string uri; + if (url->second.compare(0,4,"http") == 0) + uri = UrlUtilities::GetUrlPath(url->second); + else + uri = std::string(url->second); if (acceptor_->flip_handler_type_ == FLIP_HANDLER_SPDY_SERVER) { SpdyHeaderBlock::iterator referer = headers.find("referer"); std::string host = UrlUtilities::GetUrlHost(url->second); @@ -429,7 +437,7 @@ void SpdySM::CopyHeaders(SpdyHeaderBlock& dest, const BalsaHeaders& headers) { dest[hi->first.as_string()] = hi->second.as_string(); } else { dest[hi->first.as_string()] = ( - std::string(fhi->second.data(), fhi->second.size()) + "," + + std::string(fhi->second.data(), fhi->second.size()) + "\0" + std::string(hi->second.data(), hi->second.size())); } } |