Forum Discussion
Sake_Blok
Nimbostratus
Mar 28, 2006Workaround for invalid 304 content-length
Hi,
In a migration towards the BigIP, I encounter a problem with http-304 responses. In the http-header there is a "Content-Length" header with a value greater than 0. The http-rfc clearly states ...
bl0ndie_127134
Mar 29, 2006Historic F5 Account
Give this a try ...
when SERVER_CONNECTED {
TCP::collect 12
}
when HTTP_REQUEST_SEND {
set response_pending 1
TCP::collect 12
}
when SERVER_DATA {
if {$response_pending == 1} {
Check for 304 response
if {[TCP::payload] starts_with "HTTP/1.1 304"} {
set index [string first "Content-Length" [TCP::payload]]
Check if header is found
if {$index != -1} {
TCP::payload replace $index 2 "X-"
}
elseif {[string first "\r\n\r\n" [TCP::payload]] == -1} {
Dont have the end of header. Collect more.
TCP::collect
return
}
}
set response_pending 0
}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