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

Unified Diff: net/url_request/url_request.h

Issue 921453003: Allow URLRequest::AppendChunkToUpload to take 0-byte final chunks. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Reduce tests, refactor out some of the boilerplate, merge some lines Created 5 years, 10 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 | « net/http/http_stream_parser_unittest.cc ('k') | net/url_request/url_request.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/url_request/url_request.h
diff --git a/net/url_request/url_request.h b/net/url_request/url_request.h
index 0d5b06f17b5c70a235ff5efdf0e0211987646060..1623368126ee96fad40873faa83fba0992845c75 100644
--- a/net/url_request/url_request.h
+++ b/net/url_request/url_request.h
@@ -303,10 +303,14 @@ class NET_EXPORT URLRequest : NON_EXPORTED_BASE(public base::NonThreadSafe),
void EnableChunkedUpload();
// Appends the given bytes to the request's upload data to be sent
- // immediately via chunked transfer encoding. When all data has been sent,
- // call MarkEndOfChunks() to indicate the end of upload data.
+ // immediately via chunked transfer encoding. When all data has been added,
+ // set |is_last_chunk| to true to indicate the end of upload data. All chunks
+ // but the last must have |bytes_len| > 0.
//
// This method may be called only after calling EnableChunkedUpload().
+ //
+ // Despite the name of this method, over-the-wire chunk boundaries will most
+ // likely not match the "chunks" appended with this function.
void AppendChunkToUpload(const char* bytes,
int bytes_len,
bool is_last_chunk);
« no previous file with comments | « net/http/http_stream_parser_unittest.cc ('k') | net/url_request/url_request.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698