Forum Discussion
Valid Events for HTTP::host
Hi everyone. When I look at the documentation for the HTTP::host command, the valid events listed are: CACHE_REQUEST, HTTP_REQUEST, HTTP_REQUEST_DATA, HTTP_REQUEST_SEND
When I look at the available commands for the HTTP_RESPONSE event, the HTTP::host command is listed.
I have an iRule that contains a switch -glob for both HTTP_REQUEST AND HTTP_RESPONSE but when trying to save it, I get an error under the HTTP_RESPONSE portion of the iRule that says: [command is not valid in current event context (HTTP_RESPONSE)][HTTP::host]
- PeteWhite
Employee
retrieving the clientside request HTTP::host is not available in a serverside response event such as HTTP_RESPONSE. Grab it in HTTP_REQUEST, save it as a variable and refer to it in HTTP_RESPONSE
when HTTP_REQUEST { host = [HTTP::host] } when HTTP_RESPONSE { log local0. "My host: $host" }
Recent Discussions
Related Content
* 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