Forum Discussion
kcommerce_49734
Nimbostratus
Dec 28, 2008How to replace a HTTP XML POST content with irules?
Hi all gurus,
I just wonder whether anyone could help me to share some irule example that illustrate how to replace a HTTP XML POST content . I just would like to replace some string in the content.
Client - HTTP POST -> F5 (irules) --HTTP POST-> Server
BR/
kcommerce
- hoolio
Cirrostratus
Hi,when HTTP_REQUEST { Check if the request is a POST, with a content type of text if {[HTTP::method] eq "POST" && [HTTP::header value Content-Type] contains "text/xml"}{ Match the literal string "find" and replace it with "replace" STREAM::expression {@find@replace@} Enable the stream filter for this request only STREAM::enable } else { Disable the stream filter by default STREAM::disable } } when STREAM_MATCHED { This event is only included for debugging. You should remove the event after testing is complete. log local0. "[IP::client_addr]:[TCP::local_port]: matched: [STREAM::match]" }
- kcommerce_49734
Nimbostratus
Hi Aaron, - hoolio
Cirrostratus
That should be possible using the STREAM_MATCHED event to modify the stream replacement.
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