Forum Discussion

Josh_01_136515's avatar
Josh_01_136515
Icon for Nimbostratus rankNimbostratus
Oct 29, 2013

Disable HTTP 1.0

Hi all, I saw the similar Irule post for disabling HTTP 1.1, but being new to F5 and iRules, I don't know if the post will work if I flip the values. Anyone have experience in this? V10.2.3

 

2 Replies

  • Which direction? The [HTTP::version] command can change the HTTP version in either direction (request or response), but can involve some additional considerations depending on direction. For instance, if you change the version from 1.0 to 1.1 in the request, you must make sure that a Host header exists. The iRule you're probably referring to also manages the "Connection: Keep-Alive" header, which is generally implicit in 1.1 and explicit in 1.0.

     

  • You should probably get rid of all the HTTP::header stuff, but yes that should work.

    when HTTP_REQUEST {
        if { not ( [HTTP::header exists Host] ) } {
            HTTP::header insert Host [IP::client_addr]
        }
        HTTP::version "1.1"
    }
    when HTTP_RESPONSE {
        HTTP::version "1.1"
    }
    

    This will probably require some tweaking in your environment. Also note that this will change the protocol version as it passes through the proxy. The requests and responses will arrive at the client with 1.1, but there's nothing you can do to prevent either party from continuing to use 1.0.