cancel
Showing results for 
Search instead for 
Did you mean: 

[HTTP::uri] not working inside of a CACHE_RESPONSE event

Leo
Nimbostratus
Nimbostratus

Hi, I'm having some issues with the LTM cache, when it's on, users are complaining about receiving blank pages. I think it's just a response coming from the servers - but I can't pinpoint it.

 

I want to to see where the users are surfing when seeing a blank page, but the [HTTP::uri] is not giving me anything, here's the iRule:

 

when CACHE_RESPONSE { set payload_size [string length [CACHE::payload]] if { $payload_size < 10 } { log local0. "irule-blank cached request payload length $payload_size, Source IP is [IP::client_addr], Payload is: [CACHE::payload], URI is: [HTTP::uri]" } }

Do you have any idea?

 

3 REPLIES 3

Richard__Harlan
Historic F5 Account

You can set a variable in the HTTP_REQUEST event then when the CACHE_RESPONSE fires and the payload size is < 10 you would log the variable. I believe this is a known issue just can not find it at the moment.

 

IheartF5_45022
Nacreous
Nacreous

It's not an 'issue' as such - CACHE_RESPONSE is a serverside event, and HTTP::uri is only available in clientside events.

 

Richards solution is correct - set a variable in HTTP_REQUEST ie 'set uri [HTTP::uri]' and then reference $uri in CACHE_RESPONSE.

 

IheartF5_45022
Nacreous
Nacreous

My bad - of course CACHE_RESPONSE is clientside. Apologies.