Issue #4671 - fix NPE from CustomRequestLog logRequestCookie
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
This commit is contained in:
parent
965483e4d9
commit
288caa99f7
|
@ -1029,12 +1029,16 @@ public class CustomRequestLog extends ContainerLifeCycle implements RequestLog
|
|||
|
||||
private static void logRequestCookie(String arg, StringBuilder b, Request request, Response response)
|
||||
{
|
||||
for (Cookie c : request.getCookies())
|
||||
Cookie[] cookies = request.getCookies();
|
||||
if (cookies != null)
|
||||
{
|
||||
if (arg.equals(c.getName()))
|
||||
for (Cookie c : cookies)
|
||||
{
|
||||
b.append(c.getValue());
|
||||
return;
|
||||
if (arg.equals(c.getName()))
|
||||
{
|
||||
b.append(c.getValue());
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue