Daniel Boelzle wrote:
Are informal message status codes valid at all in synchronous scenarios? Due to the synchronous nature of these calls, I would expect the status code being either an error code (i.e. the request has failed) or NS_OK. If the channel is redirected, how do I get the redirected channel and actually wait for that request being completed?
Well, the input stream that you get does have the correct data for the final URL. What you could do to get the final channel and its status code, I guess, is implement nsIChannelEventSink and set a notificationCallbacks object that gives out that event sink, that should allow you to get the final channel. But for open() that kind of seems like a hack.
Synchronous usage of HTTP is not really designed or tested very well... -- All the world's a stage, And all the men and women merely players: They have their exits and their entrances; And one man in his time plays many parts, [...] --W. Shakespeare _______________________________________________ dev-tech-network mailing list [email protected] https://lists.mozilla.org/listinfo/dev-tech-network
