[BlackBerry] NetworkJob should stop redirecting when the request is cleared by client

https://bugs.webkit.org/show_bug.cgi?id=78029

Patch by Yong Li <yoli@rim.com> on 2012-02-07
Reviewed by Rob Buis.

When a redirect is rejected by security origin check, the ResourceRequest
will be cleared (see DocumentThreadableLoader::redirectReceived()). In this
case, we should stop handling the request.

No new tests because existing tests (like http:/tests/xmlhttprequest/redirect-cross
-origin-tripmine.html) can cover this.

* platform/network/blackberry/NetworkJob.cpp:
(WebCore::NetworkJob::startNewJobWithRequest):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@107021 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 42a03531
2012-02-07 Yong Li <yoli@rim.com>
[BlackBerry] NetworkJob should stop redirecting when the request is cleared by client
https://bugs.webkit.org/show_bug.cgi?id=78029
Reviewed by Rob Buis.
When a redirect is rejected by security origin check, the ResourceRequest
will be cleared (see DocumentThreadableLoader::redirectReceived()). In this
case, we should stop handling the request.
No new tests because existing tests (like http:/tests/xmlhttprequest/redirect-cross
-origin-tripmine.html) can cover this.
* platform/network/blackberry/NetworkJob.cpp:
(WebCore::NetworkJob::startNewJobWithRequest):
2012-02-07 David Barton <dbarton@mathscribe.com>
Remove extraneous MathML code before bug 52444 fix
......@@ -506,7 +506,8 @@ bool NetworkJob::startNewJobWithRequest(ResourceRequest& newRequest, bool increa
m_handle->client()->willSendRequest(m_handle.get(), newRequest, m_response);
// m_cancelled can become true if the url fails the policy check.
if (m_cancelled)
// newRequest can be cleared when the redirect is rejected.
if (m_cancelled || newRequest.isEmpty())
return false;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment