diff options
author | simonjam@chromium.org <simonjam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-11-01 19:22:30 +0000 |
---|---|---|
committer | simonjam@chromium.org <simonjam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-11-01 19:22:30 +0000 |
commit | 398e2215d9b04587b4bc188252786af354203bdb (patch) | |
tree | 0128478a56acc77bec0ba5c2125a5687db2fecc4 /net | |
parent | 337dd77c7231b105c2634dba0c423776bd17011f (diff) | |
download | chromium_src-398e2215d9b04587b4bc188252786af354203bdb.zip chromium_src-398e2215d9b04587b4bc188252786af354203bdb.tar.gz chromium_src-398e2215d9b04587b4bc188252786af354203bdb.tar.bz2 |
Correctly create a new stream when the server requires authentication.
The silly existing behavior is try to create another stream with the same ID,
which causes a crash.
BUG=102295
TEST=Start Chrome with --enable-http-pipelining, visit
http://test.webdav.org/auth-basic/, enter "user1" for both username and
password. It should return a "Not found" page.
Review URL: http://codereview.chromium.org/8432024
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@108151 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net')
-rw-r--r-- | net/http/http_pipelined_stream.cc | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/net/http/http_pipelined_stream.cc b/net/http/http_pipelined_stream.cc index 2183c52..6b844a6 100644 --- a/net/http/http_pipelined_stream.cc +++ b/net/http/http_pipelined_stream.cc @@ -71,8 +71,10 @@ void HttpPipelinedStream::Close(bool not_reusable) { } HttpStream* HttpPipelinedStream::RenewStreamForAuth() { - // FIXME: What does this mean on a pipeline? Is it for proxies? - return new HttpPipelinedStream(pipeline_, pipeline_id_); + if (pipeline_->usable()) { + return pipeline_->CreateNewStream(); + } + return NULL; } bool HttpPipelinedStream::IsResponseBodyComplete() const { |