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

Unified Diff: net/http/http_chunked_decoder.cc

Issue 267042: Add an interface to report the amount of data after a chunked encoding.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 2 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/http/http_chunked_decoder.cc
===================================================================
--- net/http/http_chunked_decoder.cc (revision 28152)
+++ net/http/http_chunked_decoder.cc (working copy)
@@ -51,7 +51,8 @@
: chunk_remaining_(0),
chunk_terminator_remaining_(false),
reached_last_chunk_(false),
- reached_eof_(false) {
+ reached_eof_(false),
+ bytes_after_eof_(0) {
}
int HttpChunkedDecoder::FilterBuf(char* buf, int buf_len) {
@@ -72,6 +73,7 @@
chunk_terminator_remaining_ = true;
continue;
} else if (reached_eof_) {
+ bytes_after_eof_ += buf_len;
break; // Done!
}

Powered by Google App Engine
This is Rietveld 408576698