Forum Discussion
dubdub
Nimbostratus
Nov 06, 2012A strange case for catching an exception
Environment: 11.1.0 HF2 custom EHF build
I have an iRule associated with a virtual server that's protected by an APM policy. This VS usually has north of 12,000 concurrent users, and is extremely...
hoolio
Cirrostratus
Nov 07, 2012Hi Jen,
Which event are you running this code in? [HTTP::username] should return a null string if the username isn't present in an HTTP request. I don't think it *should* return a runtime error. Do you have any hints as to what type of client request triggers this runtime error?
In addition to using catch to handle the error, can you open a case with F5 Support to let them know about the runtime TCL error?
As for your specific question, yes you can use reject to close the TCP connection with a reset:
if { [catch {set myUser [HTTP::username] } ] } {
log local0. "Invalid username from [IP::remote_addr] using [HTTP::header User-Agent]"
reject
}
Thanks,
Aaron
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