-
-
Notifications
You must be signed in to change notification settings - Fork 2k
Description
Description
Recently, we noticed a difference in the response's content-length with specific scenario where it returns url with forward slashes. For example:
* def response = {"url":"https://test"}
The expected content length is 22, but the mock server produces 24 because forward slashes / are escaped as \/ : like so
{"url":"https:\/\/test"}
Initially, I thought this was a bug and have made a simple fix by adding JSON style. However, I found existing test cases (e.g., JsonUtilsTest#testParse, StepRuntimeTest#testConversionMethodToStringAndBack) that explicitly support this behavior.
I would like to confirm whether this escaping is intentional. If it is by design, please feel free to close this issue along with my pull request.
Best regards,
Proposed solution
on JsonUtils add JSON style FLAG_PROTECT_4WEB to prevent escaping forward slashes