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

Unified Diff: net/quic/quic_http_stream.cc

Issue 343753003: Allocate a larger QUIC request body buffer (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 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 | no next file » | 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 e2084c0e5f04cc66b725659bcefdd51ef7b5e56e..88b40630f2b33e77de3cce7c337dc72fd7bc548b 100644
--- a/net/quic/quic_http_stream.cc
+++ b/net/quic/quic_http_stream.cc
@@ -121,12 +121,9 @@ int QuicHttpStream::SendRequest(const HttpRequestHeaders& request_headers,
// was being called even if we didn't yet allocate raw_request_body_buf_.
// && (request_body_stream_->size() ||
// request_body_stream_->is_chunked()))
- //
- // Use kMaxPacketSize as the buffer size, since the request
- // body data is written with this size at a time.
- // TODO(rch): use a smarter value since we can't write an entire
- // packet due to overhead.
- raw_request_body_buf_ = new IOBufferWithSize(kMaxPacketSize);
+ // Use 10 packets as the body buffer size to give enough space to
+ // help ensure we don't often send out partial packets.
+ raw_request_body_buf_ = new IOBufferWithSize(10 * kMaxPacketSize);
// The request body buffer is empty at first.
request_body_buf_ = new DrainableIOBuffer(raw_request_body_buf_.get(), 0);
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698