Forum Discussion

Ritalin_Sasquat's avatar
Ritalin_Sasquat
Historic F5 Account
Feb 12, 2005

Rewrite the HTTP or XML body?

How would I go about rewriting the HTTP body? It has been suggested that I perform a regex search and replace but am not clear how to implement this.

 

 

What I would like to do is search for a particular XML element . The value for this element has previously been encrypted by the BIG-IP. I must retrieve the value, decrypt it, rewrite that element in unencrypted form, and release the request to the server.

 

 

On the outbound trip from the server, I must identify that element, encrypt it, rewrite it to the XML body, and then send the response.

 

 

1) Would I use TCP::payload and TCP::payload release?

 

 

2) If restricted to the matches_regex operator, how can I determine the exact offset where the match begins?

 

 

3) The only documentation I can find is for the BIG-IP 4.x implementation of regex. Are advanced regular expressions supported in v9 -- or has the implementation not changed?

 

 

Any example you could give would be much appreciated.