Grega Zoubek Posted March 27, 2023 Share Posted March 27, 2023 Hi gurus....I want to do what seems to be pretty straight forward task - replace server response (body). Trick is that it is in XML format. If I use GUI and paste following syntax:"<?xml version="1.0" encoding="utf-8"?>", GUI will take it but once I return to rewrite action, I only see "" :). Log shows following actionset rewrite action VPN_Store_Force_rw_act -target "http.RES.BODY(100000)" -stringBuilderExpr """"" Looks like all between <> is deleted. Tried escaping characters in GUI with , but result is the same. Tried also CLI ,but that would result in similar error as well. Is there any other way to use GT / LT symbols or to insert XML message in the response body?Thank you, Grega Link to comment Share on other sites More sharing options...
Uttam Somani Posted April 6, 2023 Share Posted April 6, 2023 Hi Grega,This looks like a bug, we will work on getting it resolved on GUI. However as you faced the same issue on CLI side as well, but we tried with the same syntax as you have given and it worked for us. Attaching the screenshot for your reference. Link to comment Share on other sites More sharing options...
Manjunath M 3 Posted April 20, 2023 Share Posted April 20, 2023 We should use the following delimiter to insert XML responses, set rewrite action VPN_Store_Force_rw_act -target http.res.body(1000) -stringBuilderExpr q|"<xml version="1.0" encoding="utf-8">"| Link to comment Share on other sites More sharing options...
Grega Zoubek Posted April 25, 2023 Author Share Posted April 25, 2023 Hello Manjunath, your magic works, but please note that there is a question mark following < and just before >. Once you put in those ? there, fun part begins :). I cannot put in question mark in CLI (?!) and when I do that GUI, whole syntax dissapears Link to comment Share on other sites More sharing options...
Manjunath M 3 Posted April 25, 2023 Share Posted April 25, 2023 Hello Grega,We will have to escape the question mark ("?"). Please try the below command in CLI,set rewrite action VPN_Store_Force_rw_act -target http.res.body(1000) -stringBuilderExpr q|"<?xml version="1.0" encoding="utf-8"?>"|GUI bug will be fixed. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now