Mack_Hanson_107
May 24, 2005Nimbostratus
Recognize XML Request before Firing HTTP_REQUEST
I'm seeking a way to identify SOAP requests, to recognize them before the HTTP_REQUEST event fires, and then to bypass HTTP_REQUEST. Either that, or identify them in the first part of my HTTP_REQUEST rule. My existing HTTP_REQUEST rule does things like redirections and cookie evaluation -- which break the XML.
My current idea is to look for a leading XML element/signature common to SOAP, such as
and to do so in the CLIENT_DATA phase. Upon finding it, I'll direct the BIG-IP to serve the request without further inspection. Here is my existing rule (which is not working):
when CLIENT_ACCEPTED {
TCP::collect 200
}
when CLIENT_DATA {
if { [[TCP::payload] 200 contains "xml version"] }
{
log local7. "XML request"
abandon all further evaluation. Skip HTTP_REQUEST and
serve the request.
TCP::release
return
}
TCP::release
}
when HTTP_REQUEST {
Some actions that will break SOAP if it gets here
log local7. "WEB request"
Defeat conditional GETs on dynamic content
HTTP::header remove "If-Modified-Since"
HTTP::header remove "If-None-Match"
if { [HTTP::cookie exists oatmeal_cookie] != 1 }
{
HTTP::redirect "http://www.somewhere.com/"
return
}
}