Forum Discussion
andreoli_4699
Nimbostratus
Jan 13, 2010HTTP::payload replace with MORE data?
Hi all, I have the following code:
when HTTP_REQUEST priority 300 {
set original_payload [HTTP::payload]
set original_length [...
andreoli_4699
Nimbostratus
Jan 13, 2010Thanks Aaron. I tried that, as well as hard coding the number, but it all boils down to the fact that, even though it hasn't changed in size from what was originally grabbed, the buffer has gotten smaller thanks to the "pool" lookup, and the error comes in when I try to replace with anything more than 10 bytes.
For example, if I hard code the replace with this:
HTTP::payload replace 0 10 "0123456789"
it works just fine, but as soon as I add one more byte:
HTTP::payload replace 0 11 "01234567890"
I get the list index out of range error.
Tony
I can't find a way to delete this message, so I'll caveat this with, I think I misunderstood you, and what you meant to say was go ahead and tell it the current payload length (i.e. 10) regardless of the fact that it's going to be 1665. I hadn't thought about that, I'll try and let you know.
Thanks for the pointer on the content-length. I wasn't sure so was trying to cover my bases.
Thanks!
Tony
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