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

Unified Diff: net/url_request/url_request.h

Issue 6134003: Prototype of chunked transfer encoded POST. (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/url_request/url_request.h
diff --git a/net/url_request/url_request.h b/net/url_request/url_request.h
index 3561a294624dccccc8eeb5d653a794eb13b10034..879c1bd441da60165e2dc98969a64dbbfcf9cc0a 100644
--- a/net/url_request/url_request.h
+++ b/net/url_request/url_request.h
@@ -312,6 +312,14 @@ class URLRequest : public base::NonThreadSafe {
AppendFileRangeToUpload(file_path, 0, kuint64max, base::Time());
}
+ // Appends the given bytes to the requests's POST data and adds an indication
+ // that more is to come. This is useful when the POST data is not available
wtc 2011/01/12 02:39:02 I think "more is to come" is less useful info than
Satish 2011/01/13 17:43:27 Done
+ // upfront when establishing the connection and as the data becomes available
+ // it can be sent to the server.
+ // This method should be called ONLY after calling Start().
+ void AppendChunkToUpload(const char* bytes, int bytes_len);
+ void MarkEndOfChunks();
+
// Set the upload data directly.
void set_upload(net::UploadData* upload);
@@ -429,6 +437,8 @@ class URLRequest : public base::NonThreadSafe {
int load_flags() const { return load_flags_; }
void set_load_flags(int flags) { load_flags_ = flags; }
+ void set_chunked_transfer_upload() { chunked_transfer_upload_ = true; }
+
// Returns true if the request is "pending" (i.e., if Start() has been called,
// and the response has not yet been called).
bool is_pending() const { return is_pending_; }
@@ -626,6 +636,10 @@ class URLRequest : public base::NonThreadSafe {
// Whether to enable performance profiling on the job serving this request.
bool enable_profiling_;
+ // Whether the upload data contains chunks of data (sent via
+ // Chunked-Transfer encoding).
+ bool chunked_transfer_upload_;
wtc 2011/01/12 02:39:02 Nit: shorten this to chunked_upload_ (and the sett
Satish 2011/01/13 17:43:27 Done.
+
// Number of times we're willing to redirect. Used to guard against
// infinite redirects.
int redirect_limit_;

Powered by Google App Engine
This is Rietveld 408576698