Bug 149704 - Default network timeout may kick in before XHR timeout
Summary: Default network timeout may kick in before XHR timeout
Status: RESOLVED DUPLICATE of bug 163814
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebCore Misc. (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-10-01 05:09 PDT by youenn fablet
Modified: 2016-11-09 07:53 PST (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description youenn fablet 2015-10-01 05:09:21 PDT
As pointed out by ap in bug 98156, http://trac.webkit.org/changeset/189445 introduces the fact that default networking timeout becomes a max timeout for all XHR requests.

If a web app sets a XHR timeout above the default network timeout, the default network timeout will kick in.

Setting networking timeout to infinite (or a sufficiently large value) for all XHR requests may work.

Setting networking timeout to infinite for all XHR requests that have their own timeout may work.
In that case, one may want to add special handling for the case of a web app that sets back the timeout to zero.
Ideally, the XHR timer should then be set to the default networking timeout value.
Infinite may be good enough, although not entirely satisfying.
Comment 1 Eion Robb 2016-11-02 18:25:27 PDT
This issue is presenting itself in iOS10+'s WebView, any timeout set on the XMLHttpRequest object larger than 60 seconds (the default network timeout on iOS) is effectively ignored.  Timeouts smaller than 60 seconds work as expected.

http://www.openradar.me/28810194 has the iOS bug report about this
Comment 2 youenn fablet 2016-11-09 07:53:25 PST
This is covered by bug 163814
Comment 3 youenn fablet 2016-11-09 07:53:40 PST

*** This bug has been marked as a duplicate of bug 163814 ***