[ELYWEB-180] Elytron web consumes the InputStream when form parameters are parsed#297
Closed
darranl wants to merge 2 commits intowildfly-security:4.xfrom
Closed
[ELYWEB-180] Elytron web consumes the InputStream when form parameters are parsed#297darranl wants to merge 2 commits intowildfly-security:4.xfrom
darranl wants to merge 2 commits intowildfly-security:4.xfrom
Conversation
Contributor
Author
|
This ports the changes from the original proposal against 1.x to the 4.x branch. However this does fail testing for new SSO tests so something else may be required to complete porting this. |
Contributor
Author
|
@rmartinc I am still thinking about this change, is there nothing that we can do using Undertow APIs to get undertow to handle this for us? As an example InputStreams have mark and reset APIs is there no way we can delegate this to Undertow to manage? |
Contributor
Author
|
Thank you @rmartinc I will code this for now and make sure we have a link in the Jira issue for someone else to follow up. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Supercedes #213
Issue: https://issues.redhat.com/browse/ELYWEB-180
Wrapping the HttpServletRequest to replay the request for the app. Main ideas:
Wrapping is the only way of doing this cos undertow avoids using InputStream and parameters for the same request on purpose (both getInputStream and parameters are setting readStarted to true and avoiding each other).
The wrapping is only done if the size of the request is below undertow MAX_BUFFERED_REQUEST_SIZE limit to avoid saving big chunks of data.
Only query parameters are managed in any other case.
Adding a new test and other classes for the change. Project httpmime was added to the pom (test scope) in order to test multi-part requests.
The elytron-web, wilfly-core and wildfly TS run OK with the change.