Redirection Event
Fires when the server suggests a redirect.
Syntax
ANSI (Cross Platform) virtual int FireRedirection(HTTPClientRedirectionEventParams *e);
typedef struct {
const char *OldURL;
char *NewURL;
int AllowRedirection; int reserved; } HTTPClientRedirectionEventParams; Unicode (Windows) virtual INT FireRedirection(HTTPClientRedirectionEventParams *e);
typedef struct {
LPCWSTR OldURL;
LPWSTR NewURL;
BOOL AllowRedirection; INT reserved; } HTTPClientRedirectionEventParams;
- (void)onRedirection:(NSString*)oldURL :(NSString**)newURL :(int*)allowRedirection;
#define EID_HTTPCLIENT_REDIRECTION 12 virtual INT SECUREBLACKBOXLITE_CALL FireRedirection(LPSTR &lpszOldURL, LPSTR &lpszNewURL, BOOL &bAllowRedirection);
Remarks
This event is fired when the server suggests a redirection request (typically via a 301 or 302 response). OldURL indicates the 'from' page, and NewURL indicates the 'to' one. The destination page can be altered by the application if needed. Use AllowRedirection to block undesirable redirects.
Generally, this is a notification event: the component handles redirections automatically. Use the MaxRedirections config property to limit the number of redirection hops.