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

Include all values for a query param in LowerCaseQueryStringMiddleware #464

Merged

Conversation

samn
Copy link
Contributor

@samn samn commented May 6, 2022

What I am changing

  • Previously if multiple values for a query param were present on a
    request (e.g. for a List[T] = Query(...) param) only one of the values
    would be present after the LowerCaseQueryStringMiddleware ran.

How I did it

  • I noticed this issue in our production TiTiler deployment (running version 0.5.1). I copied the LowerCaseQueryStringMiddleware and made this change in our app to verify it worked as intended.
  • Also added a unit test demonstrating the fix.

How you can test it

  • A unit test is included.

Previously if multiple values for a query param were present on a
request (e.g. for a `List[T] = Query(...)` param) only one of the values
would be present after the `LowerCaseQueryStringMiddleware` ran.
@vincentsarago vincentsarago self-requested a review May 10, 2022 10:01
Copy link
Member

@vincentsarago vincentsarago left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🙏 thanks @samn

@vincentsarago vincentsarago merged commit c64eb67 into developmentseed:master May 10, 2022
@samn samn deleted the lower-case-query-string-multi branch May 10, 2022 13:42
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.

2 participants