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

Unified Diff: chrome_frame/urlmon_url_request.cc

Issue 538012: Support the PUT HTTP verb in ChromeFrame in the IE host network stack impleme... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 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 | « no previous file | net/tools/testserver/testserver.py » ('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 35831)
+++ chrome_frame/urlmon_url_request.cc (working copy)
@@ -470,13 +470,28 @@
return E_INVALIDARG;
*bind_flags = BINDF_ASYNCHRONOUS | BINDF_ASYNCSTORAGE | BINDF_PULLDATA;
+
+ bool upload_data = false;
+
if (LowerCaseEqualsASCII(method(), "get")) {
bind_info->dwBindVerb = BINDVERB_GET;
} else if (LowerCaseEqualsASCII(method(), "post")) {
bind_info->dwBindVerb = BINDVERB_POST;
+ upload_data = true;
+ } else if (LowerCaseEqualsASCII(method(), "put")) {
+ bind_info->dwBindVerb = BINDVERB_PUT;
+ upload_data = true;
+ } else {
+ NOTREACHED() << "Unknown HTTP method.";
+ status_.set_status(URLRequestStatus::FAILED);
+ status_.set_os_error(net::ERR_METHOD_NOT_SUPPORTED);
+ EndRequest();
+ return E_FAIL;
+ }
- // Bypass caching proxies on POSTs and avoid writing responses to POST
- // requests to the browser's cache.
+ if (upload_data) {
+ // Bypass caching proxies on POSTs and PUTs and avoid writing responses to
+ // these requests to the browser's cache
*bind_flags |= BINDF_GETNEWESTVERSION | BINDF_NOWRITECACHE |
BINDF_PRAGMA_NO_CACHE;
@@ -487,18 +502,13 @@
if (get_upload_data(&bind_info->stgmedData.pstm) == S_OK) {
bind_info->stgmedData.tymed = TYMED_ISTREAM;
- DLOG(INFO) << " Obj: " << std::hex << this << " POST request with "
- << Int64ToString(post_data_len()) << " bytes";
+ DLOG(INFO) << " Obj: " << std::hex << this << " " << method()
+ << " request with " << Int64ToString(post_data_len())
+ << " bytes";
} else {
DLOG(INFO) << " Obj: " << std::hex << this
<< "POST request with no data!";
}
- } else {
- NOTREACHED() << "Unknown HTTP method.";
- status_.set_status(URLRequestStatus::FAILED);
- status_.set_os_error(net::ERR_INVALID_URL);
- EndRequest();
- return E_FAIL;
}
return S_OK;
« no previous file with comments | « no previous file | net/tools/testserver/testserver.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698