Forum Discussion
HTTP::respond and HTTP/1.0
The response generated is always an HTTP/1.0 response. I was wondering why there is no option to return an HTTP/1.1 response or if there is, how would I do it?
-Al
- hoolio
Cirrostratus
Is this for HTTP or HTTPS? If for HTTP, you could set the HTTP version to 1.1 using TCP::respond (Click here): - Al_Carandang_11
Nimbostratus
It is for HTTPS and I did use the TCP::respond solution for the HTTP case. - hoolio
Cirrostratus
You could potentially use an ugly hack with an HTTPS VIP + client SSL profile pointing to an HTTP VIP with a TCP::respond iRule. Or maybe it would be easier to use an interception proxy on the client to rewrite the response. - spark_86682Historic F5 AccountIf you're on v10.x, then you can use SSL::respond for the HTTPS case. Otherwise, I think hoolio's vip-to-vip solution is your only option.
- Al_Carandang_11
Nimbostratus
We'll be upgrading to V10.0 soon so I'll wait for that to happen. - praveen_73358
Nimbostratus
Dear All, - hoolio
Cirrostratus
Praveen, - hoolio
Cirrostratus
Hi Praveen, - hoolio
Cirrostratus
In 11.2, an option was added to HTTP::respond which allows you to specify the response version:
https://devcentral.f5.com/wiki/iRules.http__respond.ashx
HTTP::respond [-version [1.0|1.1] ] [content < content value >] [noserver] [< header name > < header value >]+
Note: The -version flag was added in 11.2.0. It must immediately follow the status code and precede the content (if any) and any other flags.
You could check the client's HTTP version using [HTTP::version] in HTTP_REQUEST:
when HTTP_REQUEST { set version [HTTP::version] } when HTTP_RESPONSE { if {$some_condition == 1}{ Use 1.0 unless the client version was 1.1 if {$version ne "1.1"}{ set version "1.0" } Send the response with the version set explicitly, no BIG-IP server header and some custom headers HTTP::respond 200 -version $version content "< html >Hi" noserver header1 value1 header2 value2 } }
Aaron
- hoolio
Cirrostratus
In 11.2, an option was added to HTTP::respond which allows you to specify the response version:
https://devcentral.f5.com/wiki/iRules.http__respond.ashx
HTTP::respond < status code > [-version [1.0|1.1] ] [content < content value >] [noserver] [< header name > < header value >]+
Note: The -version flag was added in 11.2.0. It must immediately follow the status code and precede the content (if any) and any other flags.
You could check the client's HTTP version using [HTTP::version] in HTTP_REQUEST:
when HTTP_REQUEST { set version [HTTP::version] } when HTTP_RESPONSE { if {$some_condition == 1}{ Use 1.0 unless the client version was 1.1 if {$version ne "1.1"}{ set version "1.0" } Send the response with the version set explicitly, no BIG-IP server header and some custom headers HTTP::respond 200 -version $version content "< html >Hi" noserver header1 value1 header2 value2 } }
Aaron
Recent Discussions
Related Content
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com