Forum Discussion
Laurie_Swan_112
Nimbostratus
Jan 17, 2006Error running payload rewrite script
I've just tried cut-n-pasting the payload rewrite script at http://devcentral.f5.com/Default.aspx?tabid=29&ArticleType=ArticleView&ArticleID=56&PageID=61
, with just the find and replace variables changed to something more appropriate. However I get the following in the log:
TCL error: Rule payload_https_testportal - Operation not supported (line 1) invoked from within "HTTP::header replace "Connection" "Keep-Alive""
We're running BIG-IP LTM 9.0.4 Build 118.5. If I remove the entire HTTP::version stuff to add the keepalive then the script doesn't do anything at all.
I'm just looking for a way to change the http's in the output web page to https.
Any ideas??
Laurie
- Laurie_Swan_112
Nimbostratus
Ok, we have progression, but am still having problems.when HTTP_RESPONSE { set clen [HTTP::header Content-Length] if { not [info exists clen] or "0" eq $clen} { set clen 4294967295 } log local0. "HTTP_RESPONSE CLEN= $clen -End" if { $clen > 0 } { HTTP::collect $clen } } when HTTP_RESPONSE_DATA { set find "findstring" set replace "replacestring" set payload "[HTTP::payload]" log local0. "Payload [HTTP::payload length] [string length "[HTTP::payload]"] [string length $payload]" Run the regsub to make all the replacements (add -nocase for case insensitivity) if {[regsub -all $find $payload $replace new_response] > 0} { HTTP::payload replace 0 [HTTP::payload length] $new_response } }
Jan 18 11:55:42 tmm tmm[671]: Rule payload_https_testportal : HTTP_RESPONSE CLEN= 16175 -End Jan 18 11:55:42 tmm tmm[671]: Rule payload_https_testportal : Payload 16175 16175 16175
Jan 18 11:50:16 tmm tmm[671]: Rule payload_https_testportal : HTTP_RESPONSE CLEN= 16175 -End Jan 18 11:50:16 tmm tmm[671]: Rule payload_https_testportal : Payload 16175 115 115
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