Forum Discussion
Sandeep_Krishna
Feb 25, 2014Nimbostratus
The request uri is always /xxx/yyyy/SOMETHING. We get the below mentioned JSON error response on first attempt but subsequent attempts which also has the same request uri somehow bypasses this F5 irule and is served by the weblogic server. Thats the reason the JSESSIONID is attached to the response headers,
I have simplified the code as well as added some formatting. Please provide your inputs.
***************************************************************************************************************
when CLIENT_ACCEPTED {
set rewrite_response 1
}
when HTTP_REQUEST {
if { ([string tolower [HTTP::uri]] starts_with "/xxx/yyyy") && $rewrite_response==1 } {
set json "{"error": "true"}"
HTTP::respond 200 content $json "Content-Type" "application/json"
unset rewrite_response
return
}
}
***************************************************************************************************************