Peter Djalaliev wrote:
During the process, netlib calls OnStartRequest(), but somehow knows not to call OnDataAvailable() and OnStopRequest(), which I can't quite understand.
No, it doesn't call any of those. OnStartRequest is only called for the final channel (that's the intent, anyway).
Does anybody know why during a redirection processing OnDataAvailable() and StopRequest() wouldn't get called, but when I am trying to do the same thing they do?
ProcessRedirection sets mListener to null, so OnDataAvailable and OnStopRequest won't call them on the listener. OnStartRequest isn't called because ProcessResponse/ProcessRedirection never call CallOnStartRequest.
Do you think it might have to do something with the status code of the HTTP response - for example netlib would know how to handle a 301 response, but it wouldn't know how to handle a 426 Upgrade Required response, which is what I am implementing?
Seems doubtful to me... That should be all in ProcessResponse (and in the cache stuff), I'd expect.
_______________________________________________ dev-tech-network mailing list [email protected] https://lists.mozilla.org/listinfo/dev-tech-network
