Skip to content
Permalink
Browse files

[FIX JENKINS-40710] Match headers case-insensitively

  • Loading branch information...
daniel-beck committed Jan 3, 2017
1 parent 17d139f commit 628cf4cbae684b48a598ff062d430e747b160a54
Showing with 4 additions and 2 deletions.
  1. +4 −2 src/main/java/org/jenkinsci/remoting/engine/JnlpAgentEndpointResolver.java
@@ -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;

0 comments on commit 628cf4c

Please sign in to comment.
You can’t perform that action at this time.