diff options
author | ananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-12-12 03:33:17 +0000 |
---|---|---|
committer | ananta@chromium.org <ananta@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-12-12 03:33:17 +0000 |
commit | 8ec263bd2048e3d8cd67be06c1acd25bfdeedbf5 (patch) | |
tree | 63394f11f3d30aac7ee8195976384a3d216a43a4 /chrome_frame | |
parent | 7ab96be430b680492a33f259a1cdf7105dd8499c (diff) | |
download | chromium_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.cc | 6 |
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(); |