[Webkit-unassigned] [Bug 163814] New: WKWebView and WebView no longer allow async XMLHttpRequest timeout to exceed 60 seconds
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Fri Oct 21 15:27:04 PDT 2016
https://bugs.webkit.org/show_bug.cgi?id=163814
Bug ID: 163814
Summary: WKWebView and WebView no longer allow async
XMLHttpRequest timeout to exceed 60 seconds
Classification: Unclassified
Product: WebKit
Version: WebKit Nightly Build
Hardware: Unspecified
OS: macOS 10.12
Status: NEW
Severity: Normal
Priority: P2
Component: WebCore JavaScript
Assignee: webkit-unassigned at lists.webkit.org
Reporter: dasau at microsoft.com
WKWebView and WebView control do not allow XMLHttpRequest timeout to be greater than 60 seconds. The below code can repro, this was not an issue with the version of WebKit that was shipped in OSX 10.11.5, but it does not work in 10.12.1.
var xhr = new XMLHttpRequest();
var startTime = new Date();
xhr.open('GET', url, true);
xhr.timeout = 120000; // time in milliseconds
xhr.onload = function () {
};
xhr.ontimeout = function (e) {
console.error((new Date() - startTime) + " milliseconds timeout."); // 60000 milliseconds timeout.
};
xhr.send(null);
I believe the relevant code in WebKit is below, for asynchronous requests m_timeoutInterval is not getting set so it is using NSUrlRequest default timeoutInterval of 60 seconds.
XMLHttpRequest::createRequest(ExceptionCode& ec)
if (m_timeoutMilliseconds) {
if (!m_async)
request.setTimeoutInterval(m_timeoutMilliseconds / 1000.0);
else {
m_sendingTime = std::chrono::steady_clock::now();
m_timeoutTimer.startOneShot(std::chrono::milliseconds { m_timeoutMilliseconds });
}
}
ResourceRequest::doUpdatePlatformRequest
double timeoutInterval = ResourceRequestBase::timeoutInterval();
if (timeoutInterval)
[nsRequest setTimeoutInterval:timeoutInterval];
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.webkit.org/pipermail/webkit-unassigned/attachments/20161021/33ce80b3/attachment-0001.html>
More information about the webkit-unassigned
mailing list