Forum Discussion
Oct 05, 2009
checking URIs for ONLY single worded letters with no spaces
Hello all,
My objective is to find out if the incoming URI is a ALL single worded letters.
ex)
URL: http://www.hello.com/
GOOD URI:xyx/kkkj/asd
BAD URI:...
hoolio
Cirrostratus
Oct 05, 2009Hi,
A space can be encoded as + or %2b in some URL encoders or more typically as %20. Do you want check the full URI or just the path for these characters? Here's an example for checking the path:
when HTTP_REQUEST {
Check if path contains +, %2b or %20
switch [string tolower [HTTP::path]] {
"*+*" -
"*%2b*" -
"*%20*" {
Path contained a "space" character. Do something?
log local0. "Found space character in path: [HTTP::path]"
}
}
}
Aaron
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
