You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@jmeter.apache.org by bu...@apache.org on 2014/03/05 23:28:40 UTC
[Bug 56222] New: NPE if jmeter.httpclient.strict_rfc2616=true and
location is not absolute
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: issues@jmeter.apache.org
Reporter: sebb@apache.org
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.
[Bug 56222] NPE if jmeter.httpclient.strict_rfc2616=true and
location is not absolute
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=56222
Sebb <se...@apache.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution|--- |FIXED
--- Comment #1 from Sebb <se...@apache.org> ---
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
--
You are receiving this mail because:
You are the assignee for the bug.