summaryrefslogtreecommitdiffstats
path: root/net/spdy/spdy_stream.cc
diff options
context:
space:
mode:
authorerikchen@google.com <erikchen@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2010-07-26 21:46:37 +0000
committererikchen@google.com <erikchen@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2010-07-26 21:46:37 +0000
commita3eb05b90d69e44ada9e6afa99efb05e16c12996 (patch)
treec2d5e324f41bc5fb6f256ec5dbe238d46570f902 /net/spdy/spdy_stream.cc
parent3b1cbd29ffbfde742e7cdda03460912c9c812c7b (diff)
downloadchromium_src-a3eb05b90d69e44ada9e6afa99efb05e16c12996.zip
chromium_src-a3eb05b90d69e44ada9e6afa99efb05e16c12996.tar.gz
chromium_src-a3eb05b90d69e44ada9e6afa99efb05e16c12996.tar.bz2
SPDY sends RST_STREAM upon cancelling request, or bad header parse data.
Also fix spdy_http_stream_test errors. TEST=net_unittests BUG=46589, 47478, 50198 Review URL: http://codereview.chromium.org/3014030 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@53693 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/spdy/spdy_stream.cc')
-rw-r--r--net/spdy/spdy_stream.cc9
1 files changed, 6 insertions, 3 deletions
diff --git a/net/spdy/spdy_stream.cc b/net/spdy/spdy_stream.cc
index 1de67f2..dfaf4e2 100644
--- a/net/spdy/spdy_stream.cc
+++ b/net/spdy/spdy_stream.cc
@@ -58,8 +58,7 @@ void SpdyStream::SetDelegate(Delegate* delegate) {
void SpdyStream::DetachDelegate() {
delegate_ = NULL;
- if (!cancelled())
- Cancel();
+ Cancel();
}
const linked_ptr<spdy::SpdyHeaderBlock>& SpdyStream::spdy_headers() const {
@@ -222,8 +221,12 @@ void SpdyStream::OnClose(int status) {
}
void SpdyStream::Cancel() {
+ if (cancelled())
+ return;
+
cancelled_ = true;
- session_->CloseStream(stream_id_, ERR_ABORTED);
+ if(session_->IsStreamActive(stream_id_))
+ session_->ResetStream(stream_id_, spdy::CANCEL);
}
int SpdyStream::DoSendRequest(bool has_upload_data) {