Forum Discussion
ouch_32572
Nimbostratus
Mar 19, 2009irule to rewrite steam in request
Hi All,
I have an issue that i have manged to resolve on another Lb (zxtm)
I need help translating my rule into an irule for f5.
how do i rewite the stream on an incomming requ...
ouch_32572
Nimbostratus
Mar 26, 2009Hi All,
iI now get the followingin the browser.
Connection Interrupted
The document contains no data.
when HTTP_REQUEST {
if { [HTTP::method] equals "POST" && [HTTP::header exists "Content-Length"] and [HTTP::header "Content-Length"] > 0} {
regsub -all "https://10.104.30.55" [HTTP::payload] "http://10.104.30.55" newdata
log "Replacing payload with new data."
HTTP::payload replace 0 $clen $newdata
HTTP::release
}
}
Is there way of working out the content length of the new stream and replacing the header rather than using payload.
e.g something like..
when HTTP_REQUEST {
if { [HTTP::method] equals "POST" && [HTTP::header exists "Content-Length"] and [HTTP::header "Content-Length"] > 0} {
STREAM::expression "@https://10.104.30.55@http://10.104.30.55@"
HTTP::header replace "Content-Length" [HTTP::payload length]
STREAM::enable
} else {
STREAM::disable
}
}
The network link was interrupted while negotiating a connection. Please try again.
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)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
