-
Notifications
You must be signed in to change notification settings - Fork 737
modifyUris may corrupt the request or response body if it contains a URI without a port and a colon later in the content #790
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
If you don’t want the body to be changed, you are using the wrong tool for the job. Which testing client are you using to document your API? If you are using MockMvc, you should configure the URIs up front rather than modifying the requests and responses once they’ve been sent and received. |
It worked! Thank you. |
Great. Thanks for letting me know. There is still a bug here, though, as the JSON has been corrupted. |
@wilkinsona still not working for the latest version 3.0.1 withRequestDefaults(prettyPrint(), modifyUris().scheme("https").host("www.example.com").port(443)) I'm using restdocs with restassured and when there is url in body I'm getting this error. [Fatal Error] :1:2: The markup in the document preceding the root element must be well-formed. Cannot handle application/json;charset=UTF-8 content as it could not be parsed as JSON or XML |
@kubav182 please open a new issue with a minimal sample that reproduces the problem and we can investigate. |
When modifyUris() is used, the URL data in the request body is wrong converted, and PayloadHandlingException is thrown.
my preprocessRequest config
my requestbody data
requestbody data after modifyUris()
I want the modifyUris() setting to only apply to the host part and not to the request body data.
The text was updated successfully, but these errors were encountered: