Forum Discussion

nik_65678's avatar
nik_65678
Icon for Nimbostratus rankNimbostratus
Sep 25, 2009

limelight + content-length & content-encoding

we're starting to test some apps with limelight (a cdn) and it requires certain headers be present so their system will cache content. i'm trying to adjust missing/incorrect headers on outgoing http responses to include content-length and content-encoding.

 

 

* content-length -- from what i gather this header is not returned for dynamic or chunked content. is there a way to get this added through an irule at all? this is my biggest issue right now.

 

 

* content-encoding -- this is inserted via the http profile (as long as gzip compression is enabled) however it seems that the f5 does not compress all responses. is there a list of criteria that a response must meet to be compressed?

 

 

any tips on using irules to help content be cached by an external cdn would be greatly appreciated.

3 Replies

  • Have you looked at this article?

     

     

    http://devcentral.f5.com/Default.aspx?tabid=63&articleType=ArticleView&articleId=147

     

     

    CB
  • yeah, i've tested out unchunk and rechunk - with both of them my file does not include a content-encoding or vary header.
  • The only way I can think of to get the content-length is to remove chunking altogether within the Irule and returned to normal before completely finishes.

     
      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"  
        }  
      }  
     

    CB