Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(479)

Unified Diff: net/spdy/spdy_stream.cc

Issue 2811072: SPDY sends RST_STREAM upon cancelling request, or bad header parse data. (Closed)
Patch Set: Merge trunk Created 10 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/spdy/spdy_session_pool.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/spdy/spdy_stream.cc
diff --git a/net/spdy/spdy_stream.cc b/net/spdy/spdy_stream.cc
index 72a1a4f2daac9ad613340d6f3c9b51f5ea9a6986..145141ebd4c3b4901361a553036a39b4bef99a0a 100644
--- a/net/spdy/spdy_stream.cc
+++ b/net/spdy/spdy_stream.cc
@@ -53,7 +53,7 @@ void SpdyStream::SetDelegate(Delegate* delegate) {
void SpdyStream::DetachDelegate() {
delegate_ = NULL;
- if (!response_complete_ && !cancelled())
+ if (!response_complete_)
Cancel();
}
@@ -216,8 +216,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) {
« no previous file with comments | « net/spdy/spdy_session_pool.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698