Forum Discussion

credmond_17919's avatar
Icon for Nimbostratus rankNimbostratus
Feb 08, 2011

Request Body Manipulation for ICAP




I'm wondering if someone can help with with a problem I am having with ICAP requests in BIG-IP. As you might know, ICAP REQMOD and RESPMOD requests wrap HTTP requests in their request body. I want to be able to examine the wrapped HTTP request and extract a particular header through an iRule.




Example ICAP request:




REQMOD /reqmod ICAP/1.0




Date: Sat, 28 Nov 2010 15:04:01 GMT








MyHeader: blah


Pragma: no-cache





In the above example I would like to example the ICAP Request body and extract the 'MyHeader' value.




The typical HTTP iRule commands let me manipulate the ICAP request and headers easily enough, but I am struggling, to find a clean way of manipulating Request body.




Any help would be much appreciated.






4 Replies

  • You can collect the HTTP payload and modify it or the request headers using HTTP::collect/HTTP::payload. Deb wrote a helpful article with examples of this using HTTP::retry:



    Conditioning iRule Logic on External Information - 01 - HTTP::retry




  • Thanks for the reply, hoolio. I had considered the HTTP:: collect and payload functionality for this scenario, but was wondering if there was any other options that I could look at?



  • I can't think of anything else. Let us know how the testing goes. If you get stuck please post the iRule you're testing and debug logging you configure to /var/log/ltm. Else, if you get it working, it sounds like it would be a good Codeshare example :).