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

Unified Diff: net/quic/quic_http_stream.cc

Issue 2035643002: Introduce error handling in QuicHttpStream on UploadDataStream::Read() failure. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: remove 1 sec delay Created 4 years, 6 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 | « no previous file | net/quic/quic_http_stream_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/quic_http_stream.cc
diff --git a/net/quic/quic_http_stream.cc b/net/quic/quic_http_stream.cc
index d3fd026570810ccb184bacaf05b0e6455a234b9d..a027dcfac73aca1d34c43bdb41729c276bd346a8 100644
--- a/net/quic/quic_http_stream.cc
+++ b/net/quic/quic_http_stream.cc
@@ -706,15 +706,19 @@ int QuicHttpStream::DoReadRequestBody() {
}
int QuicHttpStream::DoReadRequestBodyComplete(int rv) {
- // |rv| is the result of read from the request body from the last call to
- // DoSendBody().
- if (rv < 0)
- return rv;
-
// If the stream is already closed, don't continue.
if (!stream_)
return response_status_;
+ // |rv| is the result of read from the request body from the last call to
+ // DoSendBody().
+ if (rv < 0) {
+ stream_->SetDelegate(nullptr);
+ stream_->Reset(QUIC_ERROR_PROCESSING_STREAM);
+ ResetStream();
+ return rv;
+ }
+
request_body_buf_ = new DrainableIOBuffer(raw_request_body_buf_.get(), rv);
if (rv == 0) { // Reached the end.
DCHECK(request_body_stream_->IsEOF());
« no previous file with comments | « no previous file | net/quic/quic_http_stream_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698