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 2012/11/08 11:34:32 UTC
[Bug 54119] New: HTTP 307 response is not redirected
https://issues.apache.org/bugzilla/show_bug.cgi?id=54119
Priority: P2
Bug ID: 54119
Assignee: issues@jmeter.apache.org
Summary: HTTP 307 response is not redirected
Severity: normal
Classification: Unclassified
OS: All
Reporter: p.mouawad@ubik-ingenierie.com
Hardware: All
Status: NEW
Version: 2.8
Component: HTTP
Product: JMeter
Hello,
I have a request that answers with a 307.
JMeter does not redirect it, testing it with Chrome, Safari, IE8, and Firefox
16.0.2, all browsers do the redirection.
Spec says:
" The requested resource resides temporarily under a different URI. Since the
redirection MAY be altered on occasion, the client SHOULD continue to use the
Request-URI for future requests. This response is only cacheable if indicated
by a Cache-Control or Expires header field.
The temporary URI SHOULD be given by the Location field in the response. Unless
the request method was HEAD, the entity of the response SHOULD contain a short
hypertext note with a hyperlink to the new URI(s) , since many pre-HTTP/1.1
user agents do not understand the 307 status. Therefore, the note SHOULD
contain the information necessary for a user to repeat the original request on
the new URI.
If the 307 status code is received in response to a request other than GET or
HEAD, the user agent MUST NOT automatically redirect the request unless it can
be confirmed by the user, since this might change the conditions under which
the request was issued. "
--
You are receiving this mail because:
You are the assignee for the bug.
[Bug 54119] HTTP 307 response is not redirected
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=54119
--- Comment #1 from Sebb <se...@apache.org> ---
What redirect mode are you using? Auto? Follow?
Which HTTP sampler types?
--
You are receiving this mail because:
You are the assignee for the bug.
[Bug 54119] HTTP 307 response is not redirected
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=54119
Philippe Mouawad <p....@ubik-ingenierie.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |p.mouawad@ubik-ingenierie.c
| |om
--- Comment #2 from Philippe Mouawad <p....@ubik-ingenierie.com> ---
Using follow redirect
HTTP Sampler 4.
The issue is related to the following code in HTTPSampleResult:
public boolean isRedirect() {
final String[] REDIRECT_CODES = { "301", "302", "303" }; // NOT 304!
String code = getResponseCode();
for (int i = 0; i < REDIRECT_CODES.length; i++) {
if (REDIRECT_CODES[i].equals(code)) {
return true;
}
}
return false;
}
I think 307 should be added + a check that it's a HEAD or GET before following
redirect
--
You are receiving this mail because:
You are the assignee for the bug.
[Bug 54119] HTTP 307 response is not redirected
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=54119
Philippe Mouawad <p....@ubik-ingenierie.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution|--- |FIXED
--- Comment #3 from Philippe Mouawad <p....@ubik-ingenierie.com> ---
Date: Thu Nov 8 12:02:06 2012
New Revision: 1407026
URL: http://svn.apache.org/viewvc?rev=1407026&view=rev
Log:
Bug 54119 - HTTP 307 response is not redirected
Bugzilla Id: 54119
Modified:
jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPSampleResult.java
jmeter/trunk/xdocs/changes.xml
Date: Thu Nov 8 12:03:34 2012
New Revision: 1407028
URL: http://svn.apache.org/viewvc?rev=1407028&view=rev
Log:
Bug 54119 - HTTP 307 response is not redirected
Docs
--
You are receiving this mail because:
You are the assignee for the bug.