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 req...
Michael_Yates
Nov 30, 2011Nimbostratus
Hi Roman,
I have been looking at your iRule. The first thing that I am noticing is that you are setting variables in the RULE_INIT event that are being reset in the CLIENT_ACCEPTED Event and then again in the HTTP_REQUEST Event.
The RULE_INIT is triggered when an iRule is added or is modified.
The CLIENT_ACCEPTED is triggered for each client when they connect to the Virtual Server hosting the iRule the first time.
The HTTP_REQUEST for each individual request.
So you are doing some work twice for nothing when you could just do them in the HTTP_REQUEST event (since you are resetting them for each individual request anyway).
These are the ones I am referring to:
set theUrl ""
set retry 0
set server_addr ""
set server_port ""
set host_name ""
set host_uri ""
set host_port ""
set host_port_str ""
set host_protocol ""
set postBackUrl ""
As far as your error, can reproduce the error, but I am wondering if the illegal argument error that you are getting is due to something missing.
What does the logging statement show in your LTM Log:
log local0.debug "2. Redirecting to $theUrl"
Does it appear to be the correct URL that it should be?
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