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...
hoolio
Cirrostratus
Mar 26, 2009What kind of error/problems do you see? Can you post an anonymized copy of the request headers and body (you can get this using a browser plugin like HttpFox for FF or Fiddler for IE.
Maybe the problem is that non-text POST requests are being modified. It might be good to add a check so that only POST requests with a Content-Type starting with text are rewritten:
if {[HTTP::method] eq "POST" && [HTTP::header Content-Type] starts_with "text"}{
Or is the request a multi-part form upload where the image data is being sent along with the text you're trying to rewrite? If so, the string map command might be corrupting the encoded binary content. You could try using regsub instead:
HTTP::payload replace 0 [HTTP::payload length] [regsub -all "https://10.104.30.55" [HTTP::payload] "http://10.104.30.55"]
Anyhow, if you can provide more detail on what's not working and a sample of the requests, I could more detailed suggestions.
Aaron
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
