REGRESSION (Safari 10 / r189445): WKWebView and WebView no longer allow async XMLHttp...
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 29 Oct 2016 13:44:27 +0000 (13:44 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 29 Oct 2016 13:44:27 +0000 (13:44 +0000)
commit3f7000bb1eba14ad26b271a0abb80d85d85788dc
treebf00feb932dab2c1e7e41977323b2e0a30a23ccb
parent2c9c6aa0a752adc1872a6cfbbb0a7fdcbb3b97c2
REGRESSION (Safari 10 / r189445): WKWebView and WebView no longer allow async XMLHttpRequest timeout to exceed 60 seconds
https://bugs.webkit.org/show_bug.cgi?id=163814
<rdar://problem/28917420>

Patch by Youenn Fablet <youenn@apple.com> on 2016-10-29
Reviewed by Darin Adler.

Source/WebCore:

Tests: http/tests/xmlhttprequest/resetting-timeout-to-zero.html
       http/tests/xmlhttprequest/timeout-greater-than-default-network-timeout.html

* xml/XMLHttpRequest.cpp:
(WebCore::XMLHttpRequest::setTimeout): If the XHR timeout is active, resetting the timeout to zero should lead to using the default network timeout.
Since it is difficult to update the timeout once the request is sent, we mimic the default network timeout with a 60 seconds XHR timeout.
(WebCore::XMLHttpRequest::createRequest): Setting network timeout to infinity if the XHR timeout is active.

LayoutTests:

* http/tests/xmlhttprequest/resetting-timeout-to-zero-expected.txt: Added.
* http/tests/xmlhttprequest/resetting-timeout-to-zero.html: Added.
* http/tests/xmlhttprequest/timeout-greater-than-default-network-timeout-expected.txt: Added.
* http/tests/xmlhttprequest/timeout-greater-than-default-network-timeout.html: Added.
* tests-options.json:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@208101 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/http/tests/xmlhttprequest/resetting-timeout-to-zero-expected.txt [new file with mode: 0644]
LayoutTests/http/tests/xmlhttprequest/resetting-timeout-to-zero.html [new file with mode: 0644]
LayoutTests/http/tests/xmlhttprequest/timeout-greater-than-default-network-timeout-expected.txt [new file with mode: 0644]
LayoutTests/http/tests/xmlhttprequest/timeout-greater-than-default-network-timeout.html [new file with mode: 0644]
LayoutTests/tests-options.json
Source/WebCore/ChangeLog
Source/WebCore/xml/XMLHttpRequest.cpp