Forum Discussion
hooleylist
Feb 27, 2009Cirrostratus
Does the iRule work? If so, I think it looks okay. I don't fully understand the bug though. If the server sends a 304 it can't send cotent. So why do you want to rewrite the response to a 200? Wouldn't the client get a 200 with no data and assume the object did exist but has 0 length?
If you use that rule, you could streamline it slightly by removing the check if the IMS header does not exist:
when HTTP_REQUEST {
if {[HTTP::header exists "If-Modified-Since"] } {
set ims 1
if { $::debug>=1 } { log local0. "Bingo found an If-Modified-Since from User" }
} else {
set ims 0
}
}
when HTTP_REQUEST_SEND {
TCP::collect 12
}
when SERVER_DATA {
if { [findstr [TCP::payload 12] "304"] == "304" and [info exists ims] and $ims ==0} {
TCP::payload replace 9 3 "200"
}
}
Aaron