Forum Discussion
Pavlos_Parisis_
Nimbostratus
Jun 09, 2010Rewrite HTTP status
Hi,
I am using the following iRule in order to convent HTTP Status 200 to 206
when HTTP_RESPONSE {
grab response of a 200
if {[HTTP::status] == 200}{
log local0. "Got HTTP status 200"
HTTP::collect [HTTP::header Content-Length]
}
}
when HTTP_RESPONSE_DATA {
log local0. "change response to 206 and send"
HTTP::respond 206 content [HTTP::payload]
}
My problem is that my application doesn't receive all the data, it complains that the transfer is closed while there are remaining data to be read.
The flow of the traffic is the following
Step 1: HTTP get with Range header
Step 2: F5 forwards to a proxy
Step 3: Proxy1 generates another HTTP get with Range header
Step 4: F5 forwards to another proxy
Step 5: Proxy2 generates another HTTP get without Range header
Step 6: F5 forwards to the content server
Step 7: Content server responses with HTTP Status code 200
Step 8: F5 forwards the reply to Proxy2
Step 9: Proxy2 responses to Proxy1with HTTP Status code 200
Step 10: F5 forwards the reply to Proxy1
Step 11: Proxy1 replies to client with HTTP Status code 206.
Step 12: F5 forwards to client
Because at step 9 Proxy2 responses with HTTP Status code 200 while Proxy expect 206 I wrote the above iRule to convert at step 10 the with HTTP Status code 200 to 206. But, at step 11 Proxy1 complains about the remaining data.
Any idea what I am doing wrong?
Cheers,
Pavlos
- hoolio
Cirrostratus
Hi Pavlos, - Pavlos_Parisis_
Nimbostratus
Hi hoolio,
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