Pradeep_Kandala
Nov 02, 2012Nimbostratus
Facing issue in HTTP::collect, HTTP::payload
Hi Guys,
I have a nice working IRULEs code, but for my additional operations, I'm trying to fetch the complete body from post method using the below code.. but it hangs when I add the code.
I'm not finding the proper literature which gives clear idea to use HTTP::collect and HTTP::payload
in HTTP_REQUEST
if {[HTTP::method] equals "POST"} {
if {[HTTP::header Content-Length] > 1 && [HTTP::header Content-Length] < 7000} {
set content_length [HTTP::header Content-Length]
Use default collect length
[HTTP::collect [HTTP::header Content-Length]]
log local0.info "10.0023- Printing the SAML response: $SAMLResponse IP: [IP::client_addr]"
}
}
when HTTP_REQUEST_DATA {
do stuff with the payload
set SAMLResponse [HTTP::payload]
log local0.info "60.0000- Printing the SAML response: $SAMLResponse IP: [IP::client_addr]"
HTTP::release
}
Thanks a lot in advance,
Pradeep