summaryrefslogtreecommitdiffstats
path: root/chrome_frame
diff options
context:
space:
mode:
authorananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-12-12 03:33:17 +0000
committerananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-12-12 03:33:17 +0000
commit8ec263bd2048e3d8cd67be06c1acd25bfdeedbf5 (patch)
tree63394f11f3d30aac7ee8195976384a3d216a43a4 /chrome_frame
parent7ab96be430b680492a33f259a1cdf7105dd8499c (diff)
downloadchromium_src-8ec263bd2048e3d8cd67be06c1acd25bfdeedbf5.zip
chromium_src-8ec263bd2048e3d8cd67be06c1acd25bfdeedbf5.tar.gz
chromium_src-8ec263bd2048e3d8cd67be06c1acd25bfdeedbf5.tar.bz2
The ChromeFrame redirect network tests don't complete at times as we receive invalid redirect response
codes in our bind status callback implementation. Fix is to default to 302 in this case. This is an attempt to get the network tests up on the builder. TBR=tommi Bug=30118 Review URL: http://codereview.chromium.org/494006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@34405 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome_frame')
-rw-r--r--chrome_frame/urlmon_url_request.cc6
1 files changed, 4 insertions, 2 deletions
diff --git a/chrome_frame/urlmon_url_request.cc b/chrome_frame/urlmon_url_request.cc
index 49de036..747e4ac 100644
--- a/chrome_frame/urlmon_url_request.cc
+++ b/chrome_frame/urlmon_url_request.cc
@@ -206,8 +206,10 @@ STDMETHODIMP UrlmonUrlRequest::OnProgress(ULONG progress, ULONG max_progress,
DLOG(INFO) << "URL: " << url() << " redirected to "
<< status_text;
redirect_url_ = status_text;
- redirect_status_ =
- redirect_status > 0 ? redirect_status : kDefaultHttpRedirectCode;
+ // At times we receive invalid redirect codes like 0, 200, etc. We
+ // default to 302 in this case.
+ if (!net::HttpResponseHeaders::IsRedirectResponseCode(redirect_status_))
+ redirect_status_ = kDefaultHttpRedirectCode;
// Chrome should decide whether a redirect has to be followed. To achieve
// this we send over a fake response to Chrome and abort the redirect.
std::string headers = GetHttpHeaders();