Forum Discussion
Anthony_Gerace_
Apr 06, 2006Historic F5 Account
HTTP::header not working in http_request_send event
Hi,
I am trying to use the HTTP::header command in the HTTP_REQUEST_SEND event for logging request headers. The documentation states this command should be available in this event, but using the following iRule I am not receiving any header data.
Am I missing something?
thanks.
Anthony
log statements from the ltm log file:
Apr 6 08:36:38 tmm tmm[26169]: Rule my-test-lb-select : there are 5 in this request
Apr 6 08:36:38 tmm tmm[26169]: Rule my-test-lb-select : there are 0 in this request
the request from telnet
GET / HTTP/1.0
host: test.com
cookie: spc=1;
connection: keepalive
x-client-ip: x.x.x.x
when HTTP_REQUEST {
set hdrs [HTTP::header count]
log local0. "there are $hdrs in this request"
}
when HTTP_REQUEST_SEND {
set hdrs [HTTP::header count]
log local0. "there are $hdrs in this request"
}
- Colin_Walker_12Historic F5 AccountWell, you can tell that the command is indeed valid under the event in question, because you're not getting a parse error when you try to load the iRule.
- unRuleY_95363Historic F5 AccountTry adding clientside as in:
when HTTP_REQUEST_SEND { set hdrs [clientside {HTTP::header count}] log local0. "there are $hdrs in this request" }
- Anthony_Gerace_Historic F5 AccountThat did it.
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