Forum Discussion
Raj_74912
Nimbostratus
Jun 30, 2010Unexpected CRLF with HTTP Version
Guys,
Need your help with this.
I am running version 9.4.8 and I am noticing that if I change the HTTP version in an iRule it adds extra CRLF after the irule changes the HTTP version. Any way to tell the irule not to add the extra CRLF when changing HTTP version?
So in summary when I update the HTTP version in a HTTP request I see the following: HTTP/1.0\r\n\r\n.
iRule:
if { [HTTP::version] eq "1.1" } {
if { [HTTP::header is_keepalive] } {
HTTP::header replace "Connection" "Keep-Alive"
}
HTTP::version "1.0"
} else {
if { [HTTP::version] eq "0.9" || [HTTP::version] eq "" } {
HTTP::version "1.0"
}
HTTP::version "1.0"
}
Thanks
Raj
5 Replies
- The_Bhattman
Nimbostratus
Hi Raj,
I am not that well versed in http, but it seems as though if you are version .9 or you don't have a version- to switch to version 1.0 twice. Wouldn't that be redundant?
Bhattman - Raj_74912
Nimbostratus
It will only upgrade it if its not 1.0. Yes, little redundant but should not hurt. I have removed the extra HTTP::version 1.0 with no change visable.
The issue is when F5 inserts/upgrades to HTTP version 1.0 it inserts two CRLF's making that line be the end of HTTP header. All additional info in HTTP header is then ignored by the server. - hoolio
Cirrostratus
Hi Raj,
If you can capture tcpdumps of such a failure on the inbound and outbound connections showing an extra CRLF being inserted when using HTTP::version in an iRule, I'd open a case with F5 Support as it sounds like a bug.
Aaron - Raj_74912
Nimbostratus
I did open a case with F5 and they are saying its because of iRule and that I should buy professional services. - hoolio
Cirrostratus
If an iRule command appears to have a bug, F5 Support should open a case for you and help diagnose the issue. They won't write iRules for you though. As long as you make it clear that you think there might be a bug in an iRule command they should help.
In a quick test on 10.2.0 I didn't see a problem though:when HTTP_REQUEST { if { [HTTP::version] eq "0.9" || [HTTP::version] eq "" } { HTTP::version "1.0" } }
Request into LTM
14:59:17.214679 IP 10.40.132.13.tr-rsrb-p3 > 10.42.2.102.http: P 1:7(6) ack 1 win 65535 in slot1/tmm1 lis=hooleya_http_asm
0x0000: 0ffe 0800 4500 002e 9b68 4000 7c06 c89c ....E....h@.|...
0x0010: 0a28 840d 0a2a 0266 07c5 0050 0804 82fe .(...*.f...P....
0x0020: 6f61 52be 5018 ffff f55a 0000 4745 5420 oaR.P....Z..GET.
0x0030: 2f0a 0114 0001 0001 686f 6f6c 6579 615f /.......hooleya_
0x0040: 6874 7470 5f61 736d http_asm
Request to pool member
14:59:17.218149 IP 10.42.2.2.tr-rsrb-p3 > 10.42.15.62.http: P 1:36(35) ack 1 win 4380 out slot1/tmm1 lis=hooleya_http_asm
0x0000: 0ffe 0800 4500 004b 43a7 4000 ff06 1272 ....E..KC.@....r
0x0010: 0a2a 0202 0a2a 0f3e 07c5 0050 023d 50ed .*...*.>...P.=P.
0x0020: dae8 9ead 5018 111c 5b6b 0000 4745 5420 ....P...[k..GET.
0x0030: 2f20 4854 5450 2f31 2e30 0d0a 436f 6e6e /.HTTP/1.0..Conn
0x0040: 6563 7469 6f6e 3a20 636c 6f73 650a 0a01 ection:.close...
0x0050: 1400 0000 0168 6f6f 6c65 7961 5f68 7474 .....hooleya_htt
0x0060: 705f 6173 6d p_asm
Aaron
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)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