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/base/upload_data_stream.cc

Issue 6292013: Add chunked uploads support to SPDY (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 11 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
Index: net/base/upload_data_stream.cc
diff --git a/net/base/upload_data_stream.cc b/net/base/upload_data_stream.cc
index 1f77f062a74f39609c9c5429d32abd15185c57e3..bfec67cc5ec3e9a07aaf77ed8e80f9e0fc22a5dd 100644
--- a/net/base/upload_data_stream.cc
+++ b/net/base/upload_data_stream.cc
@@ -69,7 +69,8 @@ int UploadDataStream::FillBuf() {
size_t bytes_copied = std::min(count, size_remaining);
- memcpy(buf_->data() + buf_len_, &d[next_element_offset_], bytes_copied);
+ if (bytes_copied)
Satish 2011/01/26 22:36:33 This check is required because accessing "d[0]" be
willchan no longer on Chromium 2011/01/27 18:47:49 I wonder if it'd be simpler to do: if (!bytes_copi
Satish 2011/01/27 20:42:09 Sure could do that.
+ memcpy(buf_->data() + buf_len_, &d[next_element_offset_], bytes_copied);
buf_len_ += bytes_copied;
if (bytes_copied == count) {

Powered by Google App Engine
This is Rietveld 408576698