Forum Discussion
PeteWhite
Employee
when HTTP_REQUEST {
set uri [string tolower [HTTP::uri]]
if { ( $uri contains "/bla/bla.asp") and ([URI::query $uri type]] equals "bla") } {
HTTP::respond 403
}
}
Try this - change the whole URI to lower case and then retrieve the type - your failed because you were changing the response to lower case, not the URI. Yours would also work if you did:
if { ([string tolower [HTTP::uri]] contains "/bla/bla.asp")
and ( [URI::query [string tolower [HTTP::uri]] type] equals "bla") }
That will use less memory ie it is not creating a variable but looks a bit more confusing so you take your pick.
Sabir_Alvi
Feb 05, 2020Altocumulus
I forgot to come back and thank you for this! First one worked like a charm!
- PeteWhiteFeb 06, 2020EmployeeGreat, thanks
Recent Discussions
Related Content
- May 24, 2019Former Member