Forum Discussion
jhanrahan_43314
Feb 10, 2009Nimbostratus
Use IRULE to change Response Chunking
Can I use and Irule to change the Response Chunking depending on the source IP address. If so can you please send me an example
Deb_Allen_18
Feb 11, 2009Historic F5 Account
You could try using the trick we use for HTTP collection mechanics where you force the connection to HTTP/1.0 (RFC2616 prohibits servers from responding to 1.0 requests w/chunked encoding):
when HTTP_REQUEST {
Don't allow data to be chunked
if { [HTTP::version] eq "1.1" } {
if { [HTTP::header is_keepalive] } {
HTTP::header replace "Connection" "Keep-Alive"
}
HTTP::version "1.0"
}
}
Just add a Data Group list of type Address that includes the IP addresses & networks for which chunking is not desired, and modify the above code snip to add a source IP test against the address class:
when HTTP_REQUEST {
if {[matchclass [IP::client_addr] equals $::NoChunkIPs]}{
Don't allow data to be chunked
if { [HTTP::version] eq "1.1" } {
if { [HTTP::header is_keepalive] } {
HTTP::header replace "Connection" "Keep-Alive"
}
HTTP::version "1.0"
}
}
}
hth
/d
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