Question 1) but what would I have to (or should I) modify it work with a STREAM profile ?
What do you want to use the stream profile for with this iRule? Do you mean that you're rechunking the response content? If so, I don't think that would affect the Content-Length header. I think HTTP_RESPONSE would be triggered before the HTTP payload is modified anyhow.
Question 2) I assume that this does NOT impact the basic built in statistics ?
Correct.
Question 3) When I make a new stats profile does it basically just build a "rrd" infrastructure ?
No, I think the stats data is stored in an internal memory structure. I don't think it's ever written to disk.
Question 4) there was alot of discussion in this thread BUT no single best practice was identified "hoolio" could you comment on this ?
Best practice for what part? As far as avoiding a runtime error if the Content-Length header isn't there? I'd just add a check to see if [HTTP::header Content-Length] ne "" rather than using catch.
Aaron