Forum Discussion
Roman_80473
Nov 29, 2011Nimbostratus
Redirect to another URL from inside HTTP::REQUEST after timeout detected
Hi guys,
I have setup the timer using the 'after' command inside HTTP_REQUEST which I then cancel in HTTP_RESPONSE. I detect timeout and take node out of the mix. I then need to redirect request to another url, however both HTTP::redirect and HTTP::response give me the following errors:
- Illegal argument. Can't execute in the current context. (line 1) invoked from within "HTTP::redirect $theUrl"
- Illegal argument. Can't execute in the current context. (line 1) invoked from within "HTTP::respond 302 Location "$theUrl""
Is there a way around it?
Thank you, Roman
- Michael_YatesNimbostratusCan you post the iRule so that we can see it?
- nitassEmployee
can you try this?
[root@ve1023:Active] config
- Michael_YatesNimbostratusHi Roman,
- Roman_80473NimbostratusHi nitass,
- nitassEmployeeYes, I've tried the "&", and LTM has choked on the syntax:sorry, have you tried TCP::respond i posted? it seems working in my lab unit.
- Roman_80473NimbostratusHi Michael,
- Roman_80473NimbostratusHi nitass,
- daniel_spillersNimbostratusThe solution is there, but did anyone ever determine why the HTTP::redirect is being executed within the CLIENT_ACCEPTED context, as the error message states? Why isn't it being executed only within the HTTP_RESPONSE or HTTP_REQUEST contexts?
- nitassEmployeenot sure if i catch you correctly. anyway, i am also wondering what context after's script is running is.
Recent Discussions
Related Content
Â
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects