This is an automated email from the ASF dual-hosted git repository.
fschumacher pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/jmeter.git
The following commit(s) were added to refs/heads/master by this push:
new 975906c NullPointerException in
HTTPHC4Impl$ManagedCredentialsProvider.getAuthorizationForAuthScope
975906c is described below
commit 975906ca28ece489706c2eeb5e4d6e1a125aa961
Author: Felix Schumacher <[email protected]>
AuthorDate: Mon Jun 7 21:20:59 2021 +0200
NullPointerException in
HTTPHC4Impl$ManagedCredentialsProvider.getAuthorizationForAuthScope
when 401 response from remote and httpclient4.auth.preemptive=false
and no AuthManager is configured.
Bugzilla Id: 65363
---
.../java/org/apache/jmeter/protocol/http/sampler/HTTPHC4Impl.java | 4 ++++
xdocs/changes.xml | 1 +
2 files changed, 5 insertions(+)
diff --git
a/src/protocol/http/src/main/java/org/apache/jmeter/protocol/http/sampler/HTTPHC4Impl.java
b/src/protocol/http/src/main/java/org/apache/jmeter/protocol/http/sampler/HTTPHC4Impl.java
index bf66dc2..bd6671d 100644
---
a/src/protocol/http/src/main/java/org/apache/jmeter/protocol/http/sampler/HTTPHC4Impl.java
+++
b/src/protocol/http/src/main/java/org/apache/jmeter/protocol/http/sampler/HTTPHC4Impl.java
@@ -249,6 +249,10 @@ public class HTTPHC4Impl extends HTTPHCAbstractImpl {
if (authScope == null) {
return null;
}
+ if (authManager == null) {
+ log.debug("No authManager found");
+ return null;
+ }
for (JMeterProperty authProp : authManager.getAuthObjects()) {
Object authObject = authProp.getObjectValue();
if (authObject instanceof Authorization) {
diff --git a/xdocs/changes.xml b/xdocs/changes.xml
index 76e4440..86e7744 100644
--- a/xdocs/changes.xml
+++ b/xdocs/changes.xml
@@ -147,6 +147,7 @@ Summary
<ul>
<li><bug>65310</bug>Don't let users override
<code>multipart/form-data</code> <code>content-type</code>
header in HC4 sampler.</li>
+ <li><bug>65363</bug><code>NullPointerException</code> in
<code>HTTPHC4Impl$ManagedCredentialsProvider.getAuthorizationForAuthScope</code>
when <code>401</code> response from remote and
<code>httpclient4.auth.preemptive=false</code></li>
</ul>
<h3>Other Samplers</h3>