Forum Discussion
bl0ndie_127134
Mar 29, 2006Historic F5 Account
Ok one more try, here it is again. Looks like I lost some text when pasting.
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
}
TCP::release
TCP::collect
}