Forum Discussion
Hannes_Rapp
Nimbostratus
Using your sample, you can conver it to lower-case, before using the variable for any string comparisons: set myparam [string tolower [URI::query [HTTP::uri] myparam]]
Alternatively:
set myparam [string tolower [HTTP::query]]
In case of a request www.asd.fgh/asd?fFF=1, the code above would return "fff=1" (without the query question mark).
if you want to include the query question mark, use the code below which will return "?fff=1"
set myparam "?[string tolower [HTTP::query]]"
Hannes_Rapp
Oct 12, 2015Nimbostratus
No, this understanding is not correct. This function will return the value of query parameter, the exact value present in place of x in your sample, not a binary result (0 or 1). If you want a binary result, why not try 'if {[string tolower [HTTP::query]] contains "myparameter"}{ set RESULT 1 }'