Skip to content

Commit

Permalink
Fix: parsing must be case-insensitive
Browse files Browse the repository at this point in the history
  • Loading branch information
ArneBab committed Oct 14, 2023
1 parent 7ca6adb commit ca7cb3e
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ public String toString() {
}
}

private static Map<String, String> parseForwardedHeader(String forwarded) {
static Map<String, String> parseForwardedHeader(String forwarded) {
if (forwarded == null || forwarded.trim().isEmpty()) {
return new HashMap<>();
}
Expand All @@ -99,7 +99,7 @@ private static Map<String, String> parseForwardedHeader(String forwarded) {
for (String field : fields) {
if (field.indexOf('=') != 1) {
String[] keyAndValue = field.split("=");
headerParams.put(keyAndValue[0], keyAndValue[1]);
headerParams.put(keyAndValue[0].toLowerCase(), keyAndValue[1]);
}
}
return headerParams;
Expand Down

0 comments on commit ca7cb3e

Please sign in to comment.