Forum Discussion
unRuleY_95363
Apr 04, 2005Historic F5 Account
Wow, that is some complicated iRule you've developed...
I see a couple of problems. First, is that you do this:
set ConLen [TCP::payload value "Content-Length:"]
I'm not sure what you are expecting this to do (and I'm surprised it's not giving you an error). Assuming you want to extract the value of the Content-Length, you more likely want to do this:
set ConLen [findstr [TCP::payload] "Content-Length:" 15 "\r"]
The other aspect to understand is that data will not be sent to the server until you issue the TCP::release. However, you may also re-issue a new TCP::collect which will then further collect more data and re-trigger the CLIENT_DATA event. So, it sounds like you would want to determine the size of the initial request, TCP::release that amount and then do another TCP::collect and keep doing that until the connection is closed.
However, here's another question: How come you can't just use the HTTP profile and then trigger off the HTTP_REQUEST event which already parses HTTP requests/responses? Or is this some non-HTTP protocol?