Fixed NPE in case of a missing Max-Forwards header

This commit is contained in:
Oleg Kalnichevski 2017-10-15 13:31:13 +02:00
parent 0c862432d8
commit 30320fe2f4
1 changed files with 2 additions and 1 deletions

View File

@ -354,7 +354,8 @@ public class CachingExecBase {
return false;
}
if (!"0".equals(request.getFirstHeader(HeaderConstants.MAX_FORWARDS).getValue())) {
final Header h = request.getFirstHeader(HeaderConstants.MAX_FORWARDS);
if (!"0".equals(h != null ? h.getValue() : null)) {
return false;
}