Forum Discussion
Ian_Upton_39258
Nimbostratus
Aug 27, 2008Modifying HTTP Version
We have just implemented a F5 based solution and have encountered a problem where SSL based transactions via a proxy just hung. Tracked down to IE 6 (HTTPM settings) HTTP version 1.0, something odd in the combination of proprietary web server, squid proxy and the F5.
Difficult to fix as we cannot control the state of IE 6 on customer PCs and cannot modify the proprietary web server.
I have managed to get around it with an iRule in the F5 as follows:
Any incoming HTTP 1.0 GET set the HTTP version to 1.1.
Any outgoing HTTP 1.1 set the HTTP version to 1.0.
It works but I am concerned about the following:
The following iRule snippet re-writes the HTTP version in the GET passed to the web server BUT also deletes any other data (language, cookie, etc).
if { [HTTP::version] eq "1.0" }
{
HTTP::cookie "1.1"
}
On out going traffic I do the reverse, set the HTTP version to 1.0.
The question/s are:
Is does this also modify the data from the web server????
As we are using cookie persistence (insert method) do I clobber the "inserted" cookie and lose persistence???
On input can I modify the HTTP version without losing the remainder of the data????
Any help appreciated, Ian
- hoolio
Cirrostratus
Hi Ian,when HTTP_REQUEST { Reset the variable tracking whether to update the HTTP version to 1.0 set update_version 0 If client request is 1.0, update the LTM to server version to 1.1 and track that we need reset the clientside response to 1.0 if { [HTTP::version] eq "1.0" }{ set update_version 1 HTTP::version 1.1 } } when HTTP_RESPONSE { Check if the request was 1.0 and reset the response to 1.0 if { $update_version }{ HTTP::version 1.0 } }
- Ian_Upton_39258
Nimbostratus
Thanks for the response. - hoolio
Cirrostratus
Hi Ian,when HTTP_REQUEST { Log request headers foreach a_header [HTTP::header names] { log local0. "Pre: $a_header: [HTTP::header value $a_header]" } Reset the variable tracking whether to update the HTTP version to 1.0 set update_version 0 If client request is 1.0, update the LTM to server version to 1.1 and track that we need reset the clientside response to 1.0 if { [HTTP::version] eq "1.0" }{ set update_version 1 HTTP::version 1.1 } Log request headers foreach a_header [HTTP::header names] { log local0. "Post: $a_header: [HTTP::header value $a_header]" } } when HTTP_RESPONSE { Log response headers foreach a_header [HTTP::header names] { log local0. "Pre: $a_header: [HTTP::header value $a_header]" } Check if the request was 1.0 and reset the response to 1.0 if { $update_version }{ HTTP::version 1.0 } Log response headers foreach a_header [HTTP::header names] { log local0. "Post: $a_header: [HTTP::header value $a_header]" } }
- Ian_Upton_39258
Nimbostratus
Some more agonising over iRules, lots of packet dumps and debug log entries it would appear that I was looking in the wrong places when I thought that re-writing the HTTP version deleted a lot of data in the HTTP GET/POST/etc. - hoolio
Cirrostratus
Good to hear you figured it out. You can use browser plugins to view the unencrypted HTTP headers and data (like LiveHttpHeaders for Firefox, Fiddler or HttpWatch for IE, or an interception proxy like BURP (portswigger.net) for any client that can be configured to use a proxy.
Recent Discussions
Related Content
DevCentral Quicklinks
* 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
Discover DevCentral Connects