Forum Discussion
Matt_Breedlove_
Nimbostratus
May 17, 2014Proc for fully decoding URI's
Hi All
Looking to fully sanitize URI's with a proc. Similar to what the irules codeshare FullyDecodeURI does (https://devcentral.f5.com/wiki/iRules.FullyDecodeUri.ashx) but in a proc
Im not...
Kevin_Stewart
Employee
May 19, 2014Thanks for clarifying this and confirming that HTTP:: TCP::, etc commands are offlimits in proc's even if the HTTP_REQUEST event or CLIENT_ACCEPT is calling the proc
I would just add that this shouldn't be a problem. You generally need a protocol-level event to trigger iRule processing, so whatever data is accessible in that event can be sent to the proc as a parameter. A dirty example:
proc doSomethingWithUri { uri } {
set foo [URI::decode $uri]
return $foo
}
when HTTP_REQUEST {
if { [string tolower [HTTP::uri]] starts_with "/app1" } {
set ret [call doSomethingWithUri [HTTP::uri]]
log local0. $ret
}
}
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
