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/04/27 11:00:29 UTC
[Bug 56462] New: HTTPClient fail to follow relative redirects
https://issues.apache.org/bugzilla/show_bug.cgi?id=56462
Bug ID: 56462
Summary: HTTPClient fail to follow relative redirects
Product: JMeter
Version: 2.10
Hardware: PC
Status: NEW
Severity: normal
Priority: P2
Component: HTTP
Assignee: issues@jmeter.apache.org
Reporter: shmulikk@gmail.com
In case a response contain the Location header with a relative value (not a
full URL), the sampler fails with following error:
2014/04/27 11:48:54 ERROR - jmeter.protocol.http.sampler.HTTPHC4Impl: Error in
redirect URL for GET http://XXX:1080/redir.php HTTP/1.1
Could not sanitize URL: /
java.net.MalformedURLException: no protocol: /
at java.net.URL.<init>(Unknown Source)
at java.net.URL.<init>(Unknown Source)
at java.net.URL.<init>(Unknown Source)
at
org.apache.jmeter.protocol.http.sampler.HTTPHC4Impl.sample(HTTPHC4Impl.java:337)
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(Unknown Source)
2014/04/27 11:48:54 ERROR - jmeter.samplers.SampleResult: sampleEnd called
twice java.lang.Throwable: Invalid call sequence
at
org.apache.jmeter.samplers.SampleResult.sampleEnd(SampleResult.java:1033)
at
org.apache.jmeter.protocol.http.sampler.HTTPHC4Impl.sample(HTTPHC4Impl.java:390)
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(Unknown Source)
In browsers this redirect is working fine.
This is true for the HTTPClient implementation only and works fine under the
old Java implementation.
It seems like it works under the Java implementation due to bug fix:
https://issues.apache.org/bugzilla/show_bug.cgi?id=46690
Sample of PHP script to reproduce the issue:
<?php
header( 'Location: /' ) ;
?>
Sample of JSP script to reproduce the issue:
<%
// sendRedirect works fine as it seems like the implementations fix the
location to a full path (in HttpServletResponse)
//response.sendRedirect("/");
// setting the header specifically reproduce the issue
response.setHeader("Location", "/");
response.setStatus(302);
%>
--
You are receiving this mail because:
You are the assignee for the bug.
[Bug 56462] HTTPClient fail to follow relative redirects
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=56462
Philippe Mouawad <p....@ubik-ingenierie.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
CC| |p.mouawad@ubik-ingenierie.c
| |om
Resolution|--- |WORKSFORME
--- Comment #1 from Philippe Mouawad <p....@ubik-ingenierie.com> ---
Hello,
Not reproducable as of JMeter 2.11
--
You are receiving this mail because:
You are the assignee for the bug.
[Bug 56462] HTTPClient fail to follow relative redirects
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=56462
shmulikk@gmail.com changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |shmulikk@gmail.com
OS| |All
--
You are receiving this mail because:
You are the assignee for the bug.
[Bug 56462] HTTPClient fail to follow relative redirects
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=56462
shmulikk@gmail.com changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|WORKSFORME |DUPLICATE
--- Comment #2 from shmulikk@gmail.com ---
I think that's a duplica of:
https://issues.apache.org/bugzilla/show_bug.cgi?id=55717
*** This bug has been marked as a duplicate of bug 55717 ***
--
You are receiving this mail because:
You are the assignee for the bug.