didReceiveResponse delegate method is not called when client doesn't follow redirect |
|||||||||
Issue descriptionAccording to https://developer.apple.com/documentation/foundation/nsurlsession?language=objc: "If the response is an HTTP redirect response, the NSURLSession object calls the delegate’s URLSession:task:willPerformHTTPRedirection:newRequest:completionHandler: method. That delegate method calls the provided completion handler with either the provided NSURLRequest object (to follow the redirect), a new NSURLRequest object (to redirect to a different URL), or nil (to treat the redirect’s response body as a valid response and return it as the result)." That means that if the client calls completionHandler(nil), the redirect request is treated as valid response and the subsequent didReceiveResponse: & didReceiveData: methods should be called. These methods are not called in case of Cronet. As a side note, this functionality is not supported on Android either. I.e., the client can only decide whether a redirect should be followed or not. The client cannot access the content of the body.
,
May 3 2018
Seems like a Chronet bug
,
May 3 2018
,
May 7 2018
For kapishnikov@ to triage and assign.
,
May 11 2018
,
Jul 20
,
Jul 26
mef: can you find an appropriate owner for this bug? Thanks!
,
Jul 26
,
Sep 5
Bumping up the priority as this issue may be blocking client deployment.
,
Sep 5
Underlying chromium //net stack doesn't provide response body for redirects. We can modify the redirect response in HttpProtocolHandlerCore::OnReceivedRedirect() to explicitly set Content-Length to 0 to indicate that there is no response data available. This should prevent the client from waiting for response data.
,
Jan 2
rmahindra@: Is this issue still important for you? |
|||||||||
►
Sign in to add a comment |
|||||||||
Comment 1 by kkhorimoto@chromium.org
, May 3 2018Components: -Internals>Network>Library Mobile>WebView>Glue
Owner: eugene...@chromium.org
Status: Assigned (was: Untriaged)