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

DM-47459: Added middleware for converting form post params to lowercase #340

Merged
merged 1 commit into from
Nov 26, 2024

Conversation

stvoutsin
Copy link
Member

Summary
Most IVOA specifications expect service providers to support case-insensitive params, including for application/x-www-form-urlencoded POST requests. This PR adds a middleware class CaseInsensitiveFormMiddleware which parses the form params and converts them to lowercase.

As part of the changes I've also added a couple tests for the new middleware class, and in the process have broken the middleware/ivoa_test.py tests into smaller individual tests. I can revert that if the single test is preferred.

Tests

  • Added unit tests and tested via nox
  • Tested SIAv2 app with new middleware on data-dev

Copy link
Member

@rra rra left a comment

Choose a reason for hiding this comment

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

This looks great, thank you!

changelog.d/20241126_175555_steliosvoutsinas_DM_47459.md Outdated Show resolved Hide resolved
@stvoutsin stvoutsin merged commit d2e49a7 into main Nov 26, 2024
6 checks passed
@stvoutsin stvoutsin deleted the tickets/DM-47459 branch November 26, 2024 21:29
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