[Cronet] NSURLRequest gets timeout error if data upload time exceeds the timeoutInterval |
||||||
Issue descriptionCronet implementation if NSURLRequest is affected by timeoutInterval value set on the NSURLSession or NSURLRequest. According to https://developer.apple.com/documentation/foundation/nsmutableurlrequest/1414063-timeoutinterval?changes=_2 the timeout gets triggered when "request remains idle for longer than the timeout interval". Unfortunately there are no NSURLProtocolClient (https://developer.apple.com/documentation/foundation/nsurlprotocolclient) callbacks to notify system that upload is progressing, so the request appears idle until response is received. If the upload time exceeds timeoutInterval, then request gets canceled with an error. I've verified that this problem applies to both chunked and non-chunked uploads, so pacing of data reads does NOT resolve the issue. This appears to be a system API limitation with the only workaround being increased timeout interval.
,
Jun 15 2018
,
Jul 20
kapishnikov is no longer working on Chrome, sadly.
,
Jul 26
mef: It looks like kapishnikov isn't working on Chrome anymore. Is there a more appropriate owner for this bug?
,
Jul 26
I'll make it available, but we don't have any good ideas about addressing it. I see 2 potential options: (1) Finish upload support in cronet native api and recommend that over NSURLRequest. or (2) Set NSURLRequest timeout to some very large value to avoid it being triggered and set an internal timeout in CRNHTTPProtocolHandler to manually cancel request if there is no progress. I'm working on option (1) and have WIP CL https://chromium-review.googlesource.com/c/chromium/src/+/1086127
,
Sep 20
The option (1) is now implemented and available. It should provide lesser overhead than option (2) at the cost of completely new and different API.
,
Dec 4
|
||||||
►
Sign in to add a comment |
||||||
Comment 1 by mef@chromium.org
, Jun 13 2018