HTTP Serverside Chunking For One Dot Zero Requests

Problem this snippet solves:

iRule demonstrating how to transform the serverside flow to 1.1 for 1.0 requests. Allows the server to take advantage of chunking or alternate transfer encodings even if the client cannot.

How to use this snippet:

Apply the following iRule to a virtual server which also has an http profile applied:

Code :

when HTTP_REQUEST {
   set orig_version 11
   if {[HTTP::version] eq "1.0"} {
      set orig_version 10
      HTTP::version "1.1"
   }
}
when HTTP_RESPONSE {
   if {$orig_version == 10} {
      HTTP::version "1.0"
      if {[HTTP::header exists "Transfer-Encoding"]} {
         HTTP::payload unchunk
         HTTP::header remove "Transfer-Encoding"
      }
   }
}
Published Mar 18, 2015
Version 1.0
No CommentsBe the first to comment