-
-
Notifications
You must be signed in to change notification settings - Fork 229
fix: Parsing endpoint content types with semicolon separator #727
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
fix: Parsing endpoint content types with semicolon separator #727
Conversation
Codecov Report
@@ Coverage Diff @@
## main #727 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 49 49
Lines 1971 1978 +7
=========================================
+ Hits 1971 1978 +7
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great fix, but IMO implementation is a bit heavy handed. I could in theory see us wanting to use the parsing in email
to get type/subtype/parameters separately in the future, but better to keep this as simple as possible for now IMO. Open to discussing though!
The rationale is that there's already a function in the standard library that performs the operation we need and provides the confidence that it does it in the safest and most tested way than us. |
It definitely feels weird to use the So, given that we trust |
This PR allows to extract the content type safely removing any extra parameter like
charset
orboundary
.