-
-
Notifications
You must be signed in to change notification settings - Fork 440
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
Lazily cache request body for Spring requests instead of eagerly caching it #3641
base: 8.x.x
Are you sure you want to change the base?
Lazily cache request body for Spring requests instead of eagerly caching it #3641
Conversation
Hi @lee-jinhwan, I had a quick look, but unfortunately one our Integration tests is failing due to the changes. The Test in question is Also one of the unit tests fails ( So the We will come back to you once we had a quick internal discussion. |
@lbloder Thank you for your kind review. I hadn't thought about the case where the body is not read. I fixed the failed test case using inputstream. |
77d9871
to
0892804
Compare
@adinauer Oops, I fixed the test case failure, please run the checks again. To anyone, what about support for other mimes tpyes? Have you had any discussions about support? |
Not yet, I'm just coming back from vacation. |
@lee-jinhwan we just discussed the PR and would like to retarget it onto the Can you confirm this changes behaviour in the following way (for the changelog): Regarding MIME-types, which types would you like to see supported? |
0892804
to
553b889
Compare
Changed to the 8.x.x branch target. JSON is used a lot, but form-urlencoded requests are also used a lot, so I would like to support for “application/x-www-form-urlencoded”. |
Thanks @lee-jinhwan, I've created #3656 to track the MIME type changes. Should land in 8.0. Can't give an ETA though. I'll take another look at merging this PR once I'm up to date with PRs and TODOs that should land in 8.x.x so I can come up with a good merge order. |
Hello @lee-jinhwan I just tested the changes and unfortunately the first POST request to the /person endpoint in our Spring Boot 3 sample fails with Testing the same thing on the 8.x.x branch succeeds on the first request. I did not do any investigations as to why this happens. |
…or to use inputStream and fallback to cached content if inputStream is finished
…ns a readable inputstream
📜 Description
Support other Content-types, including JSON.💡 Motivation and Context
application/x-www-form-urlencoded
.Request
in embed-Tomcat, if the InputStream is read first(body cached), the parameter will not be parsed.💚 How did you test it?
📝 Checklist
sendDefaultPII
is enabled.🔮 Next steps