Forum Discussion
elvisc_26948
Nimbostratus
Feb 04, 2010Extract URI from http_response
We have an application that generate unique session IDs by the server(NOT client), and Its part imbedded as part of the URI path.
My question is how do I extract that URI from the HTTP_RESPONSE so I can persist so subsequent request would stick to the same server.
thx in advance.
- The URI is not available in the context of the HTTP Response event. If you need to know what it is from the original request, you need to store that in a session variable in the HTTP_REQUEST event.
when HTTP_REQUEST { set uri [HTTP::uri] } when HTTP_RESPONSE { log local0. "Returning response for URI: $uri" }
- elvisc_26948
Nimbostratus
Yes but the problem with that is the session ID has to be generated by the client...in my case its generated by the server and I have to persistent the session in the HTTP_RESPONSE_DATA. - hoolio
Cirrostratus
I haven't tested it fully, but I played around with using a stream filter and iRule to search response content for a string and add a persistence record based on it: - hoolio
Cirrostratus
I added a note to the Codeshare example which shows the need to parse the persistence token from some portion of request headers or payload. If you try this, could you let me know how it goes? I or you can then update the codeshare example if there are any issues.
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