Forum Discussion
Kirk_Bauer_1018
Nimbostratus
Mar 31, 2007Can't get HTTP payload modification iRule to work
I have tried this rule, largely pieced together from sample code on this site:
when HTTP_REQUEST {
set uri [HTTP::uri]
}
when HTTP_RESPONSE {
log local0. "$uri:...
Kirk_Bauer_1018
Nimbostratus
Mar 31, 2007I did some more testing by adding unique variables to each request and trying multiple parallel requests. Upon changing the rule, the first request to the virtual server hangs, and all other requests will hang, until the first request is aborted. Once the first request is aborted, all other hanging requests to the virtual server complete OK. All future requests work fine without hanging. But the page is never modified, and the HTTP_RESPONSE_DATA code segment is only executed for the first request and only after I abort the request, which means I don't get to see the modified page.
As I said before all future requests never collect data because apparently now the Content-Length header exists but is set to 0. If I modify the HTTP::collect line to always collect 10,000 bytes instead of looking at the content-length header, now all requests hang.
I don't understand how the first response has no content-length header, and future responses have the header but have a value of 0. I also don't understand how I'm supposed to collect the whole page without knowing how big it is as even a value of 10000 for collecting seems to hang the response.
FYI I have chunking set to "rechunk" in the HTTP profile.
Recent Discussions
Related Content
DevCentral Quicklinks
* 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
Discover DevCentral Connects