jungm commented on code in PR #1328: URL: https://github.com/apache/tomee/pull/1328#discussion_r1693766759
########## tomee/tomee-security/src/main/java/org/apache/tomee/security/http/SavedRequest.java: ########## @@ -102,12 +102,20 @@ public Enumeration<String> getHeaderNames() { @Override public Enumeration<String> getHeaders(String name) { - return Collections.enumeration(headers.get(name)); + List<String> header = headers.get(name); + if (header == null) { + header = Collections.emptyList(); + } + return Collections.enumeration(header); } @Override public String getHeader(String name) { - return headers.get(name).get(0); + List<String> header = headers.get(name); + if (header == null || header.isEmpty()) { + return null; Review Comment: Not sure if we should turn an empty header value into null implicitly, I'll check later what other implementations of HttpServletRequest do in that case -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: dev-unsubscr...@tomee.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org