Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[FIX JENKINS-40710] Match headers case-insensitively
  • Loading branch information
daniel-beck committed Jan 3, 2017
1 parent 17d139f commit 628cf4c
Showing 1 changed file with 4 additions and 2 deletions.
Expand Up @@ -427,8 +427,10 @@ static boolean inNoProxyEnvVar(String host) {
private static List<String> header(@Nonnull HttpURLConnection connection, String... headerNames) {
Map<String, List<String>> headerFields = connection.getHeaderFields();
for (String headerName : headerNames) {
if (headerFields.containsKey(headerName)) {
return headerFields.get(headerName);
for (String headerField : headerFields.keySet()) {
if (headerField.equalsIgnoreCase(headerName)) {
return headerFields.get(headerName);
}
}
}
return null;
Expand Down

0 comments on commit 628cf4c

Please sign in to comment.