summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-01-22 00:51:53 +0000
committerananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-01-22 00:51:53 +0000
commit533e681e84a1eaccc29f990ce08cab54ab80c77b (patch)
tree9962a3c2933bc901d4d8dbae30bea845e61640e8
parent5193d537d7a68cb5bf50bacc9e42437d6faf66d5 (diff)
downloadchromium_src-533e681e84a1eaccc29f990ce08cab54ab80c77b.zip
chromium_src-533e681e84a1eaccc29f990ce08cab54ab80c77b.tar.gz
chromium_src-533e681e84a1eaccc29f990ce08cab54ab80c77b.tar.bz2
ChromeFrame full tab mode was not supporting the PROPFIND verb correctly, in the sense
that these requests can upload data on the same lines as regular HTTP POST and PUT requests. As a result we would end up never sending out the request to the server. Cleaned up the code in our IBindStatusCallback::GetBindInfo implementation to always honor the posted data length associated with the current request and use it to determine whether we have data to upload. Fixes bug http://code.google.com/p/chromium/issues/detail?id=70302 BUG=70302 TEST=As described in the bug at this point. We need to add support in the HTTPTest server to allow the PROPFIND and other custom methods. Will do that in a subsequent CL. Review URL: http://codereview.chromium.org/6360011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@72246 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--chrome_frame/urlmon_url_request.cc15
1 files changed, 7 insertions, 8 deletions
diff --git a/chrome_frame/urlmon_url_request.cc b/chrome_frame/urlmon_url_request.cc
index ba9d8f7..acbb8a0 100644
--- a/chrome_frame/urlmon_url_request.cc
+++ b/chrome_frame/urlmon_url_request.cc
@@ -437,16 +437,13 @@ STDMETHODIMP UrlmonUrlRequest::GetBindInfo(DWORD* bind_flags,
if (load_flags_ & net::LOAD_BYPASS_CACHE)
*bind_flags |= BINDF_GETNEWESTVERSION;
- 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 {
std::wstring verb(ASCIIToWide(StringToUpperASCII(method())));
bind_info->dwBindVerb = BINDVERB_CUSTOM;
@@ -455,12 +452,12 @@ STDMETHODIMP UrlmonUrlRequest::GetBindInfo(DWORD* bind_flags,
lstrcpyW(bind_info->szCustomVerb, verb.c_str());
}
- if (upload_data) {
- // Bypass caching proxies on POSTs and PUTs and avoid writing responses to
- // these requests to the browser's cache
+ if (post_data_len()) {
+ // Bypass caching proxies on upload requests and avoid writing responses to
+ // the browser's cache.
*bind_flags |= BINDF_GETNEWESTVERSION | BINDF_PRAGMA_NO_CACHE;
- // Attempt to avoid storing the response for XHR request.
+ // Attempt to avoid storing the response for upload requests.
// See http://crbug.com/55918
if (resource_type_ != ResourceType::MAIN_FRAME)
*bind_flags |= BINDF_NOWRITECACHE;
@@ -468,7 +465,9 @@ STDMETHODIMP UrlmonUrlRequest::GetBindInfo(DWORD* bind_flags,
// Initialize the STGMEDIUM.
memset(&bind_info->stgmedData, 0, sizeof(STGMEDIUM));
bind_info->grfBindInfoF = 0;
- bind_info->szCustomVerb = NULL;
+
+ if (bind_info->dwBindVerb != BINDVERB_CUSTOM)
+ bind_info->szCustomVerb = NULL;
if (get_upload_data(&bind_info->stgmedData.pstm) == S_OK) {
bind_info->stgmedData.tymed = TYMED_ISTREAM;