Forum Discussion

Mike_Blue_30573's avatar
Mike_Blue_30573
Icon for Nimbostratus rankNimbostratus
Mar 29, 2005

Get formatted as HTTP 1.0

Just a quick question.

 

Any assistance greatly appreciated.

 

 

I have found the HTTP::version command and am trying to build a rule.

 

I dont quite understand how to format the syntax to change an http get

 

to http 1.0.

 

 

Basically if a http get ends in .csv or .rtf and equals http 1.1 then the response needs to be formatted as http 1.0 and sent back.

 

 

 

I hate to use this forum and not be able to provide something in return,

 

but I am new to Irules.

 

 

 

Thanks for any help

 

 

 

2 Replies

  • bl0ndie_127134's avatar
    bl0ndie_127134
    Historic F5 Account
    Yes, you can use the HTTP::version rule to set the version that is sent to the client/server. I think this rule might do the trick.

    class files { 
       ".csv" 
       ".rtf" 
     } 
      
     when HTTP_REQUEST { 
       if { [matchclass [HTTP::uri] ends_with $::files] } {   
          if {[HTTP::header is_keepalive]} { 
             HTTP::header replace "Connection" "keep-alive" 
          } 
          HTTP::version "1.0" 
       } 
     }