mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
Pass the |redirectUrl| parameter to GetResponseHeaders() instead of ProcessRequest() (issue #414).
git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@362 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
This commit is contained in:
@@ -170,7 +170,6 @@ public:
|
||||
: test_results_(tr), offset_(0), is_sub_(false), has_delayed_(false) {}
|
||||
|
||||
virtual bool ProcessRequest(CefRefPtr<CefRequest> request,
|
||||
CefString& redirectUrl,
|
||||
CefRefPtr<CefSchemeHandlerCallback> callback)
|
||||
OVERRIDE
|
||||
{
|
||||
@@ -192,12 +191,8 @@ public:
|
||||
|
||||
test_results_->got_request.yes();
|
||||
|
||||
if (!test_results_->redirect_url.empty()) {
|
||||
redirectUrl = test_results_->redirect_url;
|
||||
return true; // don't call Continue() for URL redirects.
|
||||
} else if (!test_results_->html.empty()) {
|
||||
if (!test_results_->html.empty())
|
||||
handled = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (handled) {
|
||||
@@ -219,7 +214,8 @@ public:
|
||||
}
|
||||
|
||||
virtual void GetResponseHeaders(CefRefPtr<CefResponse> response,
|
||||
int64& response_length) OVERRIDE
|
||||
int64& response_length,
|
||||
CefString& redirectUrl) OVERRIDE
|
||||
{
|
||||
if (is_sub_) {
|
||||
response->SetStatus(test_results_->sub_status_code);
|
||||
@@ -237,7 +233,9 @@ public:
|
||||
response->SetMimeType("text/html");
|
||||
response_length = test_results_->sub_html.size();
|
||||
}
|
||||
} else {
|
||||
} else if (!test_results_->redirect_url.empty()) {
|
||||
redirectUrl = test_results_->redirect_url;
|
||||
} else {
|
||||
response->SetStatus(test_results_->status_code);
|
||||
|
||||
if (!test_results_->html.empty()) {
|
||||
|
Reference in New Issue
Block a user