If jmeter.httpclient.strict_rfc2616=true and the Location: header consists of just a path (no protocol/host) then an NPE is generated: java.lang.NullPointerException at org.apache.jorphan.util.JOrphanUtils.replaceAllChars(JOrphanUtils.java:264) at org.apache.jmeter.protocol.http.sampler.HTTPSamplerBase.encodeSpaces(HTTPSamplerBase.java:1332) at org.apache.jmeter.protocol.http.sampler.HTTPSamplerBase.followRedirects(HTTPSamplerBase.java:1404) at org.apache.jmeter.protocol.http.sampler.HTTPSamplerBase.resultProcessing(HTTPSamplerBase.java:1482) at org.apache.jmeter.protocol.http.sampler.HTTPAbstractImpl.resultProcessing(HTTPAbstractImpl.java:306) at org.apache.jmeter.protocol.http.sampler.HTTPHC4Impl.sample(HTTPHC4Impl.java:411) at org.apache.jmeter.protocol.http.sampler.HTTPSamplerProxy.sample(HTTPSamplerProxy.java:74) at org.apache.jmeter.protocol.http.sampler.HTTPSamplerBase.sample(HTTPSamplerBase.java:1105) at org.apache.jmeter.protocol.http.sampler.HTTPSamplerBase.sample(HTTPSamplerBase.java:1094) at org.apache.jmeter.threads.JMeterThread.process_sampler(JMeterThread.java:429) at org.apache.jmeter.threads.JMeterThread.run(JMeterThread.java:257) at java.lang.Thread.run(Thread.java:744) This is because it's not possible to create a URL without a protocol, so the code skips setting the result redirectlocation. This eventually causes the NPE. Seems to have been caused by http://svn.apache.org/r1550547 (Bug 55717) A work-round is to save the unsantised location header in case the exception path is taken
URL: http://svn.apache.org/r1574701 Log: NPE if jmeter.httpclient.strict_rfc2616=true and location is not absolute Bugzilla Id: 56222 Modified: jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPHC3Impl.java jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPHC4Impl.java jmeter/trunk/xdocs/changes.xml
This issue has been migrated to GitHub: https://github.com/apache/jmeter/issues/3335