Skip to content

Commit

Permalink
[FIX JENKINS-40710, JENKINS-41513] JnlpAgentEndpointResolver - Add nu…
Browse files Browse the repository at this point in the history
…ll check, use correct header for map key (#140)
  • Loading branch information
cgag authored and oleg-nenashev committed Jan 31, 2017
1 parent 02b5964 commit 813489e
Showing 1 changed file with 2 additions and 2 deletions.
Expand Up @@ -428,8 +428,8 @@ private static List<String> header(@Nonnull HttpURLConnection connection, String
Map<String, List<String>> headerFields = connection.getHeaderFields();
for (String headerName : headerNames) {
for (String headerField : headerFields.keySet()) {
if (headerField.equalsIgnoreCase(headerName)) {
return headerFields.get(headerName);
if (headerField != null && headerField.equalsIgnoreCase(headerName)) {
return headerFields.get(headerField);
}
}
}
Expand Down

0 comments on commit 813489e

Please sign in to comment.