Forum Discussion
nik_65678
Nimbostratus
Aug 19, 2009[http::uri] in http_response
i'm wondering if there's any way to get the value of [http::uri] in the http_response event without setting a variable? here's what i have now:
when http_request {
set uri [http::uri]
}
when http_response {
switch -glob [string tolower $uri] {
}
}
this works fine but i'd like to get rid of the variable if bigip has that same information cached someplace already. [http::uri] does not work in http_response, so is there any other way?
- dennypayne
Employee
Hi, - hoolio
Cirrostratus
As far as I'm aware, LTM doesn't save the HTTP::uri past the HTTP request events in the clientside context. The URI listed in the Location response header is completely independent of the requested URI. So I think you'll need to save the URI in HTTP_REQUEST in order to have it available in HTTP_RESPONSE. So as Denny said, this is necessary if LTM doesn't cache the value itself and you want to reference it in a server side event. - nik_65678
Nimbostratus
yeah, ltm doesn't keep track of either between events (request/response). i'm going to continue to set the uri/host in the request so the response knows how to manage the data going out (lots of header rewrites etc).
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