Forum Discussion
Joe_Hsy_45207
Nimbostratus
Jan 18, 2008HTTP:collect 4MB limit bug>?
Hi,
I just learned that there is a limit to HTTP::collect of 4 mb before it will crash TMM:
https://support.f5.com/kb/en-us/solutions/public/6000/500/sol6578.html?sr=350501
This means many of the sample iRles on devcentral (credit card scrubber, for example) could cause TMM to crash! Anyway, we're working on a workaround for our iRule and I have the following question:
If the content-length for a http response is greater this 4MB, is there a way to collect the end of the content using HTTP::release and HTTP::collect pairs? In other words, in the HTTP_RESPONSE_DATA event, call HTTP::release, then HTTP::collect until the last content is recieved. I don't need to keep all the content, but I need an event to trigger when the last content is received.
The above seems doable if the content-length header exists and we know ahead of time the size of the content. However, how could this be made to work when content-length header is missing? Is there a way to know when the last byte of content has been received?
Alternatively, is there an event other than HTTP_RESPONSE_DATA which will trigger when the last byte of HTTP content is received from the server?
Thanks!
//Joe
7 Replies
Sort By
- Deb_Allen_18Historic F5 Account
Hi Joe -
The functional limit if you're running any manipulation of payload can actually be as small as 1MB if regex ops are involved.
The workaround is to limit the amount collected to 1MB at a time (or 4MB if you just need to scan the payload).
I just added a codeshare example covering the basics: HTTP Payload Collection
Post back if you have more questions after looking it over.
/deb
- Joe_Hsy_45207
Nimbostratus
Hi Deb, - Deb_Allen_18Historic F5 AccountHi Joe -
- Joe_Hsy_45207
Nimbostratus
Hi Deb, - Deb_Allen_18Historic F5 AccountThe collect mechanism will time out internally after no data has been received for a short time, even if the entire specified content length has not been received. I'm not sure what the timing is there, but it's short enough to keep the connection from stalling and induced latency is minimal.
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