Forum Discussion
Andrew_Bretten_
Nimbostratus
Oct 29, 2006payload replace fails against content from .jsp ?
I have the following iRule appled to a virtual server
when HTTP_RESPONSE_DATA {
set find "http://"
set replace "https://"
set payload [HTTP::payload]
if {[regsub -all $find $payload $replace new_response] > 0} {
HTTP::payload replace 0 [HTTP::payload length] $new_response
}
}
If I throw up a simple .html page like
The Link is re-written to https correctly.
However the real application we are trying to "fix" is returning
- hoolio
Cirrostratus
If you want to replace http with https in the HTTP content, try using the stream profile. It's simpler and should be much faster than using regsub and HTTP::payload. - Andrew_Bretten_
Nimbostratus
aaron, thanks for the reply. - Andrew_Bretten_
Nimbostratus
Ok I've made more progress.....regsub seems to be operating against only a certain amount of data. - hoolio
Cirrostratus
Hi Andy, - Andrew_Bretten_
Nimbostratus
Ok....here's what I ended up with. From another thread, I found I can multiple match/replaces in a stream profile.
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