Skip to content

Commit

Permalink
remove */* case
Browse files Browse the repository at this point in the history
  • Loading branch information
franz1981 committed Dec 14, 2023
1 parent ee4c2b4 commit 5678ef7
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -110,9 +110,6 @@ public boolean isRawAcceptedWithSingleProduces(String accept, int length) {
end--;
}
int trimmedAcceptLength = end - start + 1;
if (trimmedAcceptLength == 3 && "*/*".regionMatches(0, accept, start, 3)) {
return true;
}
// WARNING: this is strict for security reasons ie a malformed accept header element will not match
// otherwise we would have been forced to parse the rest of accept header (eg params)
// see https://www.rfc-editor.org/rfc/rfc2616#section-14.1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -201,8 +201,7 @@ private boolean acceptHeaderMatches(RequestMapper.RequestMatch<RuntimeResource>
* This is the case with 2 Accepted types and a single Produces type
*/
private boolean acceptHeaderMatchesSingleProduces(String accepts, MediaType producesMediaType, int commaIndex) {
System.out.println("acceptHeaderMatchesSingleProduces: " + accepts + ", " + producesMediaType + ", " + commaIndex);
System.exit(0);
System.out.println("***************** acceptHeaderMatchesSingleProduces: " + accepts + ", " + producesMediaType + ", " + commaIndex);
var firstMediaType = toMediaType(accepts.substring(0, commaIndex).trim());
if (producesMediaType.isCompatible(firstMediaType)) {
return true;
Expand Down

0 comments on commit 5678ef7

Please sign in to comment.