Forum Discussion
Kirk_Bauer_1018
Apr 02, 2007Nimbostratus
Thanks for your help. I'm able to collect 2750 bytes of data, then call TCP::release and the page displays. However the page still breaks if I actually modify anything. If I comment out the actual replacement command then it works OK (but of course the page is not modified). Here is the code fragment:
when HTTP_RESPONSE_DATA {
log local0. "$uri;$my_id;$time: Entered HTTP_RESPONSE_DATA"
set indices [regexp -all -inline -indices {/intl/en_com/images/logo_plain.png} [HTTP::payload]]
foreach idx $indices {
set start [lindex $idx 0]
set end [lindex $idx 1]
set len [expr {$end - $start + 1}]
log local0. "$uri;$my_id;$time: Found String, len=$len"
HTTP::payload replace $start $len "http://kaybee.org:8080/google_f5.png"
}
HTTP::release
}
So this code works since the replacement line is commented out. And I see the log entry showing it found a match. So what could be wrong with my replace command?
Thanks in advance!