Forum Discussion
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
Host: 127.0.0.1:8080
Date: Sat, 28 Nov 2010 15:04:01 GMT
GET http://www.somesite.com HTTP/1.1
Host: www.somesite.com
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.
Thanks!
- hooleylistCirrostratusYou 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:
- credmond_17919NimbostratusThanks 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?
- hooleylistCirrostratusI 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 :).
- Simon_Conway-SmNimbostratus
Same question. I see at https://devcentral.f5.com/wiki/iRules.ICAP.ashx that you can get the header, method, status and url from an ICAP REQMOD request, but I need to extract the encapsulated HTTP request and test the 'Host:' header value in that. How?
Recent Discussions
Related Content
* 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