mirror of
https://github.com/apache/httpcomponents-client.git
synced 2025-02-16 23:16:33 +00:00
Fixed NPE in case of a missing Max-Forwards header
This commit is contained in:
parent
0c862432d8
commit
30320fe2f4
@ -354,7 +354,8 @@ boolean clientRequestsOurOptions(final HttpRequest request) {
|
||||
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;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user