Forum Discussion
Craig_Jackson_2
Nimbostratus
Jun 06, 2007Spurious CRLF before HTTP verb
We're running into a problem with a spurious \r\n being sent to the server immediately preceding a HTTP verb. This is in a OneConnect environment.
The problem occurs because IE (6 and 7 at ...
John_Gouk_10641
Nimbostratus
Jul 02, 2007Right. Spotted an error in the iRule that meant it was not matching on the bad packets - fixed below.
However, although it now logs that it is replacing data, it doesn't seem to, in that I'm still getting the error, and traces of traffic to/from the server still show packets with CRLF as the first 2 chars, as left behind from a POST.
Anybody out there?!
Cheers
J
when HTTP_REQUEST {
if { [HTTP::method] eq "POST"} {
log local0. "HTTP_REQUEST triggered"
log local0. "host: [HTTP::host]"
if { [HTTP::header exists "Content-Length"] } {
set content_length [HTTP::header "Content-Length"]
} else {
set content_length 4294967295
}
log local0. "CRLF Rule:contentLength: $content_length"
if { $content_length > 0 } {
HTTP::collect $content_length
}
}
}
when HTTP_REQUEST_DATA {
log local0. "HTTP_REQUEST_DATA triggered"
HTTP::release
TCP::collect 2
}
when CLIENT_DATA {
binary scan [TCP::payload 2] H* hex
log local0. "CLIENT_DATA triggered: data $hex"
if { $hex eq "0d0a" } {
log local0. "replacing data"
TCP::payload replace 0 0 0
}
TCP::release
}
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