Forum Discussion
Nicola_DT
Nimbostratus
May 07, 2009String substitution issue in an http stream (soap)
Hi everyone,
I am using an irule that I have discovered somewhere in the dev central, my goal is to substitute a value in a tcp stream with another value, to be more specific a c...
hoolio
Cirrostratus
May 18, 2009Hi Nicola,
So when you use a stream expression of {@YWRtaW46YWRtaW4=@cGlwcG86MTIzNDU=@} you see the debug being logged from the STREAM_MATCHED event, but you don't see the actual request payload modified? That doesn't sound correct.
If you want to replace the base64 encoded username:password with an encoded string from somewhere else in the payload, you would either need to set the stream expression to a regex which matches both the string you want to encode and insert as well as the string you want to replace. In the STREAM_MATCHED event you could then use STREAM::match to get the matched string and STREAM::replace to replace the string.
If you can post an anonymized sample of the request payload I can try to give you a more exact example. Else, you can check the last example on the STREAM::expression wiki page for a rough idea (Click here).
Aaron
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