Skip to content
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

Case insensitive lookup for deserialization type for header parameters #123

Merged
merged 3 commits into from
Feb 6, 2020

Conversation

miklish
Copy link
Contributor

@miklish miklish commented Feb 6, 2020

The ParameterDeserializer class in the openapi-meta module of light-rest-4j uses a case sensitive lookup to determine how to deserialize header values. This violates RFC 7230 which states that header names are case insensitive.

See issue #122 for full details.

… for deserialization type for header parameters
@stevehu
Copy link
Contributor

stevehu commented Feb 6, 2020

@miklish Is it possible to add a unit test case to ensure that this logic won't be modified accidentally in the future. Thanks.

@miklish
Copy link
Contributor Author

miklish commented Feb 6, 2020

@stevehu For sure... working on that now

@miklish
Copy link
Contributor Author

miklish commented Feb 6, 2020

Unit tests added to check that header values are properly deserialized even if header name has different case than OpenAPI (i.e.: header names case insensitive). Also added negative unit tests to ensure that query and cookie parameters remain case sensitive.

@stevehu stevehu self-requested a review February 6, 2020 20:25
@stevehu stevehu merged commit b46c885 into 1.6.x Feb 6, 2020
@stevehu stevehu deleted the issue122 branch February 6, 2020 20:26
@miklish
Copy link
Contributor Author

miklish commented Feb 6, 2020

@stevehu Thanks! @zabooma @jsu216 Please examine the changes when you can.

stevehu pushed a commit that referenced this pull request Feb 6, 2020
#123)

* (issue #122) Make parameter deserializer do a case insensitive lookup for deserialization type for header parameters

* add unit tests to check that headers with arbitrary case are properly deserialized (but not cookie or query params)

* add unit tests to check that headers with arbitrary case are properly deserialized (but not cookie or query params)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants