Index: net/base/upload_data_stream.cc |
diff --git a/net/base/upload_data_stream.cc b/net/base/upload_data_stream.cc |
index 936c9128833017c91e5738b4338974748ec7af4e..43216d4aa34698f53a20ecea17df34439d3888bb 100644 |
--- a/net/base/upload_data_stream.cc |
+++ b/net/base/upload_data_stream.cc |
@@ -43,8 +43,8 @@ int UploadDataStream::Read(IOBuffer* buf, |
const CompletionCallback& callback) { |
DCHECK(!callback.is_null() || IsInMemory()); |
DCHECK(initialized_successfully_); |
- DCHECK_GT(buf_len, 0); |
- if (is_eof_) |
+ DCHECK_GE(buf_len, 0); |
+ if (!buf_len || is_eof_) |
michaeln
2015/03/09 21:15:18
This is a little troublesome because generally rea
mmenke
2015/03/09 21:20:09
Can we instead set is_eof_ to true in SetSize, if
mmenke
2015/03/09 21:22:41
The test should be in elements_upload_data_stream_
cmumford
2015/03/09 22:05:11
Reverted this change as suggested.
|
return 0; |
int result = ReadInternal(buf, buf_len); |
if (result == ERR_IO_PENDING) { |