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

Unified Diff: chrome_frame/urlmon_url_request.cc

Issue 6357017: Add support for chunked encoding in ChromeFrame for POST requests. This fixes... (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
« no previous file with comments | « chrome_frame/urlmon_upload_data_stream.cc ('k') | net/base/upload_data.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome_frame/urlmon_url_request.cc
===================================================================
--- chrome_frame/urlmon_url_request.cc (revision 72649)
+++ chrome_frame/urlmon_url_request.cc (working copy)
@@ -22,8 +22,8 @@
#include "chrome_frame/urlmon_upload_data_stream.h"
#include "chrome_frame/utils.h"
#include "net/base/load_flags.h"
+#include "net/http/http_response_headers.h"
#include "net/http/http_util.h"
-#include "net/http/http_response_headers.h"
UrlmonUrlRequest::UrlmonUrlRequest()
: pending_read_size_(0),
@@ -567,11 +567,15 @@
std::string new_headers;
if (post_data_len() > 0) {
- // Tack on the Content-Length header since when using an IStream type
- // STGMEDIUM, it looks like it doesn't get set for us :(
- new_headers = base::StringPrintf(
- "Content-Length: %s\r\n",
- base::Int64ToString(post_data_len()).c_str());
+ if (is_chunked_upload()) {
+ new_headers = base::StringPrintf("Transfer-Encoding: chunked\r\n");
+ } else {
+ // Tack on the Content-Length header since when using an IStream type
+ // STGMEDIUM, it looks like it doesn't get set for us :(
+ new_headers = base::StringPrintf(
+ "Content-Length: %s\r\n",
+ base::Int64ToString(post_data_len()).c_str());
+ }
}
if (!extra_headers().empty()) {
« no previous file with comments | « chrome_frame/urlmon_upload_data_stream.cc ('k') | net/base/upload_data.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698