diff options
author | ananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-05-20 18:33:20 +0000 |
---|---|---|
committer | ananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-05-20 18:33:20 +0000 |
commit | cd3596da33e4258a8778c36e97703bfeb456e24c (patch) | |
tree | 9c1dc9550b3018d7c338ff042a960fad0e318c3f /chrome_frame | |
parent | f2bccd8c887c99196722e77872204b366a1492a1 (diff) | |
download | chromium_src-cd3596da33e4258a8778c36e97703bfeb456e24c.zip chromium_src-cd3596da33e4258a8778c36e97703bfeb456e24c.tar.gz chromium_src-cd3596da33e4258a8778c36e97703bfeb456e24c.tar.bz2 |
Fix a chrome frame bug with empty XHR post requests whose responses would incorrectly end up being
cached in IE, thus causing the page to show stale data.
Fix is to turn off urlmon caching related bind flags for empty post requests.
BUG=82127
Review URL: http://codereview.chromium.org/7054003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@86115 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome_frame')
-rw-r--r-- | chrome_frame/urlmon_url_request.cc | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/chrome_frame/urlmon_url_request.cc b/chrome_frame/urlmon_url_request.cc index a53a047..860544d 100644 --- a/chrome_frame/urlmon_url_request.cc +++ b/chrome_frame/urlmon_url_request.cc @@ -469,7 +469,8 @@ STDMETHODIMP UrlmonUrlRequest::GetBindInfo(DWORD* bind_flags, lstrcpyW(bind_info->szCustomVerb, verb.c_str()); } - if (post_data_len()) { + if (bind_info->dwBindVerb = BINDVERB_POST || + bind_info->dwBindVerb == BINDVERB_PUT) { // Bypass caching proxies on upload requests and avoid writing responses to // the browser's cache. *bind_flags |= BINDF_GETNEWESTVERSION | BINDF_PRAGMA_NO_CACHE; @@ -486,7 +487,8 @@ STDMETHODIMP UrlmonUrlRequest::GetBindInfo(DWORD* bind_flags, if (bind_info->dwBindVerb != BINDVERB_CUSTOM) bind_info->szCustomVerb = NULL; - if (get_upload_data(&bind_info->stgmedData.pstm) == S_OK) { + if (post_data_len() && + get_upload_data(&bind_info->stgmedData.pstm) == S_OK) { bind_info->stgmedData.tymed = TYMED_ISTREAM; #pragma warning(disable:4244) bind_info->cbstgmedData = post_data_len(); @@ -498,7 +500,6 @@ STDMETHODIMP UrlmonUrlRequest::GetBindInfo(DWORD* bind_flags, DVLOG(1) << __FUNCTION__ << me() << "POST request with no data!"; } } - return S_OK; } |