Forum Discussion
Michael_Horvat_
Nimbostratus
Mar 28, 2007Appending URI
Does anyone know why the http::uri will not set to the uri variable?
set uri [HTTP::uri]
if { ! ([matchclass [string tolower [HTTP::uri]] contains $::WebFiles])
...
Mar 28, 2007
The problem is the set command. The "HTTP::uri" command comes in two flavors, one to retrieve the value (if used with no parameters) and one to set the value (if a value parameter is given).
With that being said, a simpler way would be to avoid the append on the temporary variable and just change it with the HTTP::uri command.
set uri [HTTP::uri]
if { ! ([matchclass [string tolower [HTTP::uri]] contains $::WebFiles])
and ! ( $uri ends_with "/" ) } {
HTTP::uri "[HTTP::uri]/"
}-Joe
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
