Skip to content

Commit

Permalink
Merge pull request #139 from daniel-beck/JENKINS-40710
Browse files Browse the repository at this point in the history
[FIX JENKINS-40710] Match headers case-insensitively
  • Loading branch information
oleg-nenashev committed Jan 8, 2017
2 parents 17d139f + 628cf4c commit 02b5964
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
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 02b5964

Please sign in to comment.