Forum Discussion
Rostislav_Zatol
Nimbostratus
Nov 20, 2009replace IP in POST body with source IPaddr
Hello,
I am searching for possibility to replace in xml formated HTTP POST body an IPaddress with TCP source IP address.
I sure have to use STREAM. So something like this...
Rostislav_Zatol
Nimbostratus
Dec 11, 2009It seems that I really have problem with content-Length. AP server denies if it doese not match :-(
So I am trying to replace payload now
With fix mapping it works:
HTTP::payload replace 0 [HTTP::payload length] [string map -nocase "10.0.0.139 $client_ip" [HTTP::payload]]
But folliowing case doese not match. Its mandatory to match whole strings including newline and space :-(
set client_ip [IP::client_addr]
HTTP::payload replace 0 [HTTP::payload length] [string map -nocase {"IPAddress\n*.*.*.*" "IPAddress\n$client_ip"} [HTTP::payload]]
damn...
BR
RZ
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
