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 29, 2007
That's due to an optimization in the caching of variables. The value of [HTTP::uri] is stored in a cache and when you re-assign the value with the "HTTP::uri value" command, the cached value for the [HTTP::uri] command is not updated. The URI will get modified, but the value returned from [HTTP::uri] is the original value. That issue has been around for a long time, maybe someday it'll get fixed.
In the meantime, if you want to verify your changes with logging, I'd suggest you use a temporary variable.
when HTTP_REQUEST {
log local0. "in HTTP_REQUEST"
log local0. "Original: [HTTP::uri]."
set uri "/prefix[HTTP::uri]/what_the/"
log local0. "After mapping: $uri"
HTTP::uri $uri
}You can verify this by looking at your backend webserver logs.
-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
