https://issues.apache.org/bugzilla/show_bug.cgi?id=56222
Bug ID: 56222
Summary: NPE if jmeter.httpclient.strict_rfc2616=true and
location is not absolute
Product: JMeter
Version: 2.11
Hardware: PC
OS: Windows XP
Status: NEW
Severity: normal
Priority: P2
Component: HTTP
Assignee: [email protected]
Reporter: [email protected]
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
--
You are receiving this mail because:
You are the assignee for the bug.