Back to index
Implement this interface to receive control over various channel events. More...
|void||onChannelRedirect (in nsIChannel oldChannel, in nsIChannel newChannel, in unsigned long flags)|
|Called when a redirect occurs. |
|const unsigned long||REDIRECT_TEMPORARY = 1 << 0|
|This is a temporary redirect. |
|const unsigned long||REDIRECT_PERMANENT = 1 << 1|
|This is a permanent redirect. |
|const unsigned long||REDIRECT_INTERNAL = 1 << 2|
|This is an internal redirect, i.e. |
Implement this interface to receive control over various channel events.
Channels will try to get this interface from a channel's notificationCallbacks or, if not available there, from the loadGroup's notificationCallbacks.
These methods are called before onStartRequest, and should be handled SYNCHRONOUSLY.
|void nsIChannelEventSink::onChannelRedirect||(||in nsIChannel||oldChannel,|
|in unsigned long||flags|
Called when a redirect occurs.
This may happen due to an HTTP 3xx status code.
|oldChannel||The channel that's being redirected.|
|newChannel||The new channel. This channel is not opened yet.|
|flags||Flags indicating the type of redirect. A bitmask consisting of flags from above. One of REDIRECT_TEMPORARY and REDIRECT_PERMANENT will always be set.|
|<any>||Throwing an exception will cancel the load. No network request for the new channel will be made.|