Skip to content

Commit

Permalink
Merge pull request quarkusio#38554 from geoand/quarkusio#38523
Browse files Browse the repository at this point in the history
Only allow a single Location to be set in RESTEasy Reactive
  • Loading branch information
geoand authored Feb 9, 2024
2 parents bf99e94 + 086cc01 commit 6c122a6
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ public void accept(ResteasyReactiveRequestContext context) {

private static final String CONTENT = "Content";
private static final String CONTENT_LOWER = "content";
private static final String LOCATION = "Location";
private static final String TYPE = "Type";
private static final String TYPE_LOWER = "type";
private static final String LENGTH = "Length";
Expand Down Expand Up @@ -532,7 +533,7 @@ public static void encodeResponseHeaders(ResteasyReactiveRequestContext requestC
}

private static boolean requireSingleHeader(String header) {
if (!(header.startsWith(CONTENT) || header.startsWith(CONTENT_LOWER))) {
if (!(header.startsWith(CONTENT) || header.startsWith(CONTENT_LOWER) || header.startsWith(LOCATION))) {
return false;
}
if (header.length() < CONTENT.length() + 2) {
Expand Down

0 comments on commit 6c122a6

Please sign in to comment.