Forum Discussion

Leo's avatar
Leo
Icon for Nimbostratus rankNimbostratus
Dec 08, 2013

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

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

  • Richard__Harlan's avatar
    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.

     

  • 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.