Forum Discussion

Ritalin_Sasquat's avatar
Ritalin_Sasquat
Historic F5 Account
Jan 27, 2005

Eval HTTP_REQUEST cookies inside WHEN HTTP_RESPONSE condition?

A process I'm designing will rebuild the HTTP_RESPONSE based upon what cookies were submitted in the HTTP_REQUEST.

 

 

In the 9.0 Configuration Guide, table 13.17's "response message" section lists a variety of functions for accessing the cookie data. It would seem v9 provides all the inspection methods required for my solution. Still, I'd like to confirm one fact before pitching this approach to management.

 

 

While executing a block, are these functions ('HTTP::cookie names' for example) able to access the original cookies submitted in the HTTP_REQUEST, or are they limited to only evaluating the Set-Cookie responses that have come back from the server?

 

 

  • drteeth_127330's avatar
    drteeth_127330
    Historic F5 Account
    Yes, I believe v9 has the inspection capabilities that you require. The cookies from the request are not available in the HTTP_RESPONSE event. However, you can save them in a variable from an HTTP_REQUEST rule. For example:

    when HTTP_REQUEST { 
         set cookie_names [HTTP::cookie names] 
     }