Forum Discussion
Vishal_96707
Nimbostratus
Jan 21, 2009iRule for Response Header "content-length"
I need help with getting the "content-length" value in Response header. Basically the iRule should check for HTTP "Status" 404 and "content-length" not equal to zero.
Thanks in a...
nitass
Employee
Jan 06, 2015"err tmm1[17512]: 01220001:3: TCL error: /Common/xml_rule - Illegal argument (line 2) invoked from within "HTTP::collect [HTTP::header Content-Length]" " error message in /var/log/ltm when no any soap data was sent.
does content-length header exist (i.e. [HTTP::header content-length] is not null)?
what about something like this?
when HTTP_REQUEST {
if { [HTTP::header exists Content-Length] } {
HTTP::collect [HTTP::header Content-Length]
} else {
do something
}
}
when HTTP_REQUEST_DATA {
if { [findstr [HTTP::payload] "list" 1 " x" ] contains "test_string" } {
pool test1
} else {
pool test2
}
}
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)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