Forum Discussion

romolo82's avatar
romolo82
Icon for Cirrus rankCirrus
Jul 05, 2023

Set HTTP version

Hi,

I need to set HTTP version on a service, forcing request and response from 1.0 to 1.1.

I tried with this command on the irule:

when HTTP_REQUEST {
HTTP::version "1.1"
}

but doesn't work. Anyone has a suggestion, please?

Thanks a lot

  • romolo82 You might try the following to see if it resolves your issue.

    when HTTP_REQUEST priority 500 {
        HTTP::version "1.1"
    }
    
    when HTTP_RESPONSE priority 500 {
        HTTP::version "1.1"
    }

     What are you using to validate that the HTTP request has moved from HTTP 1.0 to HTTP 1.1 instead? You could use the following curl to validate this change.

    curl -IvkH 'Host: <fqdn>' "http://<url>"
  • romolo82 You might try the following to see if it resolves your issue.

    when HTTP_REQUEST priority 500 {
        HTTP::version "1.1"
    }
    
    when HTTP_RESPONSE priority 500 {
        HTTP::version "1.1"
    }

     What are you using to validate that the HTTP request has moved from HTTP 1.0 to HTTP 1.1 instead? You could use the following curl to validate this change.

    curl -IvkH 'Host: <fqdn>' "http://<url>"
    • romolo82's avatar
      romolo82
      Icon for Cirrus rankCirrus

      Thanks a lot, it seems work.

      I used coomand

      curl -IvkH 'Host: <fqdn>' "http://<url>"
        and I receive this output:

      * Trying 172.23.130.146:443...
      * Connected to servizi***** (**** port 443 (#0)
      * schannel: disabled automatic use of client certificate
      * ALPN: offers http/1.1
      * ALPN: server did not agree on a protocol. Uses default.
      * using HTTP/1.x
      > HEAD /***/****/ HTTP/1.1
      > Host: servizi****
      > User-Agent: curl/8.0.1
      > Accept: */*
      > 'Host:******'
      >
      < HTTP/1.1 302 Found
      HTTP/1.1 302 Found
      < Date: Wed, 05 Jul 2023 12:49:41 GMT
      Date: Wed, 05 Jul 2023 12:49:41 GMT
      < Server: Apache/2.4.6 (Red Hat)
      Server: Apache/2.4.6 (Red Hat)
      < Location: https://*******/
      Location: https://*******/
      < Connection: close
      Connection: close
      < Set-Cookie: BIGip_stat=1524644153; Path=/; Domain=.inps.it; Version=1; Secure
      Set-Cookie: BIGip_stat=1524644153; Path=/; Domain=.inps.it; Version=1; Secure

      <
      * Closing connection 0
      * schannel: shutting down SSL/TLS connection with ***** port 443