Forum Discussion
Enable or disable chunking based on URI
We have a website with two different applications on it. For example, and .
Due to some older code that the app-a application is running, they are forced to used Compatibility Mode within IE to make it work. When we migrated the application from our old Cisco ACE load balancers to our F5's (11.6.1 HF1), the application broke. What we eventually figured out is that we had to set Request Chunking in the http profile to 'Rechunk' for it to work.
Unfortunately, this broke app-b. So with Rechunk on, it fixes app-a but breaks app-b. With it off, it breaks app-a but fixes app-b.
What I'm trying to find out is, is there a way, with an irule, to say "if the uri includes app-a, enable rechunk for response chunking but if it includes app-b (or maybe anything else), don't enable it"?
I tried using an irule to tell the web server to only use http 1.0, so chunking wouldn't be an issue and although the rule worked, if I didn't have rechunk turned on, the app-a application didn't work.
3 Replies
- Vijay_E
Cirrus
I am not aware of iRule that can chunk based on URI. May be someone else can help you out. Simplest option available to you is to separate the app into 2 sites (mysite.a.com & mysite.b.com) and use 2 different VS.
There are HTTP::payload rechunk and HTTP::payload unchunk iRule commands. I think you can use these.
This code snippet might get you going:
- Max_Q_factor
Cirrocumulus
I think the answer may be to set the Virtual Server to use HTTP 1.0 (in the HTTP profile) and trigger re-chunking on the application URL that requires re-chunking, using a modified iRule like:
when HTTP_REQUEST { if { [string tolower [HTTP::uri]] starts_with "/app-a" } { set app a HTTP::version "1.1" } } when HTTP_RESPONSE { if {$app == a} { HTTP::version "1.0" if {[HTTP::header exists "Transfer-Encoding"]} { HTTP::payload unchunk HTTP::header remove "Transfer-Encoding" } } }
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