-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Loosen restriction on casing of the Accept
header
#20026
Conversation
The TCK passes, but I am on the fence about this one. @FroMage WDYT? |
@@ -40,8 +41,15 @@ public void handle(ResteasyReactiveRequestContext requestContext) throws Excepti | |||
requestContext.setResponseContentType(mediaType); | |||
requestContext.setEntityWriter(writer); | |||
} else { | |||
throw new WebApplicationException( | |||
Response.notAcceptable(Variant.mediaTypes(mediaType.getMediaType()).build()).build()); | |||
// some clients might be sending the header with incorrect casing... |
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.
Technically not incorrect since it's supposed to be case-insensitive ;)
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.
Very good point :)
Failing Jobs - Building b3d5028
Full information is available in the Build summary check run. Failures⚙️ MicroProfile TCKs Tests #- Failing: tcks/microprofile-fault-tolerance
📦 tcks/microprofile-fault-tolerance✖
|
The RESTEasy Reactive TCK tests passed - the failure is in an unrelated module |
@FroMage can I get a review of this please? |
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.
Looks okay, but I guess this might happen with other header parameters as well, maybe move this check to a Headers
class or something like it (in a different PR if you like)?
Yeah, it could perhaps happen. But let's fix this case for the time being 😎 |
For the posterity, probably a more object oriented solution would be |
Fixes: #20021