Jason Mathison created HTTPCLIENT-2367:
------------------------------------------
Summary: InternalAbstractHttpAsyncClient.java NPE when
Key: HTTPCLIENT-2367
URL: https://issues.apache.org/jira/browse/HTTPCLIENT-2367
Project: HttpComponents HttpClient
Issue Type: Bug
Components: HttpClient (async)
Affects Versions: 5.4.4, 5.4.3
Reporter: Jason Mathison
Starting in the 5.4.3 release of HttpClient, in the
org/apache/hc/client5/http/impl/async/InternalAbstractHttpAsyncClient.java
file, it is possible to get an Null Pointer Exception thrown by this section of
code:
final HttpHost resolvedTarget = target != null ? target :
RoutingSupport.determineHost(request);
if (request.getScheme() == null) {
request.setScheme(resolvedTarget.getSchemeName());
}
The issue is that the RoutingSupport.determineHost can return null, then this
line
request.setScheme(resolvedTarget.getSchemeName());
will attempt to dereference resolvedTarget, which is null.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]