-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Handle parsing of form attributes with no value
MicronautHttpData.AttributeImpl is updated to provide an implementation of the setValue method. This implementation is needed in the corner cases where Netty's HttpPostStandardRequestDecoder successfully parses an attribute with no value such as in the body "a&b=2". Tests are added to more thoroughly test the various forms of x-www-form-urlencoded bodies as specified by https://url.spec.whatwg.org/#application/x-www-form-urlencoded. These tests include scenarios where we know and expect that HttpPostStandardRequestDecoder will currently fail to parse an attribute with a name but no value - namely when that attribute is the last one in a given POST body. If HttpPostStandardRequestDecoder is patched in the future, then these expected parsing failures can be moved into the success scenario instead. This partially resolves #10446.
- Loading branch information
1 parent
4fc430f
commit d6bde2d
Showing
2 changed files
with
113 additions
and
1 deletion.
There are no files selected for viewing
This file contains 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
This file contains 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