Forum Discussion
HTTP::collect does not working for http response that is chunked
We have irule using http::collect and only when the response data is chunked, F5 does not respond back to client even when the chunking is disabled in http profile.
When we issue http connection:close in HTTP REQUEST or disable collect all works fine. I'm trying to find why the http::collect would not work along with chunking.
I noticed that all articles in devcentral suggest to disable chunking before using http::collect. No idea why? pls advise..
-Sri
3 Replies
- nitass
Employee
how much data do you want to collect? if whole data, what length will you use when response is sent in chunk?
Also, if you use HTTP::collect without specifying a length, you must have some non-HTTP event (e.g. AUTH_RESULT or NAME_RESOLVED) run HTTP::release, or HTTP processing will not continue, and the collected data will be discarded when the connection times out.HTTP::collect wiki
https://devcentral.f5.com/wiki/iRules.HTTP__collect.ashx Hi Sridhar,
you may try the iRule code below and see if its solving your issue. It helped me already in different chucking related issues (e.g. problems in combination with STREAM and Compression) and hopefully in your case too.
when HTTP_RESPONSE { if [HTTP::header exists "Transfer-encoding"] { HTTP::payload rechunk } }Cheers, Kai
- Hannes_Rapp
Nimbostratus
Does an incoming request contain HTTP header:
i.e.Accept-Encoding
? You may also have issues with payload search & replace functions if end-server responds with compressed content. Note that you can still compress on the clientside (i.e. use HTTP Compression profile), but the serverside content must remain uncompressed.Accept-Encoding: gzip, deflateTry the following:
when HTTP_REQUEST { if { [HTTP::header exists "Accept-Encoding"]}{ HTTP::header remove Accept-Encoding } ... The rest of your iRule }
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)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