You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jmeter.apache.org by "epoitier (via GitHub)" <gi...@apache.org> on 2023/09/20 16:40:34 UTC
[GitHub] [jmeter] epoitier opened a new issue, #6080: JMeter does not comply with RFC9110#15.4.8(307 Temporary Redirect)
epoitier opened a new issue, #6080:
URL: https://github.com/apache/jmeter/issues/6080
### Expected behavior
When a HTTP server send back a 307 redirection from an original POST method, the user agent need to keep the same method when processing the redirection
### Actual behavior
The 307 redirection from a POST request is managed but the method used during the redirection is not a POST anymore. As mentioned in the RFC9110#15.4.8, the redirection is not done according to the rules below:
**15.4.8. 307 Temporary Redirect**
The 307 (Temporary Redirect) status code indicates that the target resource resides temporarily under a different URI and the user agent MUST NOT change the request method if it performs an automatic redirection to that URI. Since the redirection can change over time, the client ought to continue using the original target URI for future requests.
The server SHOULD generate a Location header field in the response containing a URI reference for the different URI. The user agent MAY use the Location field value for automatic redirection. The server's response content usually contains a short hypertext note with a hyperlink to the different URI(s).
### Steps to reproduce the problem
Create a HTTP Request sampler targeting a server sending back a 307 redirection.
### JMeter Version
5.6
### Java Version
openjdk version "11.0.16.1" 2022-08-12 LTS
### OS Version
Microsoft Windows [version 10.0.22621.2283]
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@jmeter.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] JMeter does not comply with RFC9110#15.4.8(307 Temporary Redirect) [jmeter]
Posted by "epoitier (via GitHub)" <gi...@apache.org>.
epoitier commented on issue #6080:
URL: https://github.com/apache/jmeter/issues/6080#issuecomment-2039091430
Hi, sorry for the delay in my response. I could add one if we would have an embedded web server to execute the test in this specific case, is there in JMeter any tests which may involve an embedded web server I could use to get some inspiration ?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@jmeter.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] JMeter does not comply with RFC9110#15.4.8(307 Temporary Redirect) [jmeter]
Posted by "vlsi (via GitHub)" <gi...@apache.org>.
vlsi commented on issue #6080:
URL: https://github.com/apache/jmeter/issues/6080#issuecomment-1872497716
This looks like a valid bug. @epoitier , do you think you could add a test case as well?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@jmeter.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [jmeter] epoitier commented on issue #6080: JMeter does not comply with RFC9110#15.4.8(307 Temporary Redirect)
Posted by "epoitier (via GitHub)" <gi...@apache.org>.
epoitier commented on issue #6080:
URL: https://github.com/apache/jmeter/issues/6080#issuecomment-1728111644
A proposed patch can be found attached to this thread
[issue-6080.patch](https://github.com/apache/jmeter/files/12675660/issue-6080.patch)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@jmeter.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] JMeter does not comply with RFC9110#15.4.8(307 Temporary Redirect) [jmeter]
Posted by "vlsi (via GitHub)" <gi...@apache.org>.
vlsi closed issue #6080: JMeter does not comply with RFC9110#15.4.8(307 Temporary Redirect)
URL: https://github.com/apache/jmeter/issues/6080
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@jmeter.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] JMeter does not comply with RFC9110#15.4.8(307 Temporary Redirect) [jmeter]
Posted by "vlsi (via GitHub)" <gi...@apache.org>.
vlsi commented on issue #6080:
URL: https://github.com/apache/jmeter/issues/6080#issuecomment-2039190073
Check out WireMock-based tests: https://github.com/search?q=repo%3Aapache%2Fjmeter%20wiremock&type=code
For instance:
* https://github.com/apache/jmeter/blob/09c3f810dda7efaf1510ac062454d978d90a0741/src/protocol/http/src/test/kotlin/org/apache/jmeter/protocol/http/sampler/HttpSamplerTest.kt#L81
* https://github.com/apache/jmeter/blob/09c3f810dda7efaf1510ac062454d978d90a0741/src/protocol/http/src/test/java/org/apache/jmeter/protocol/http/sampler/ParallelResourcesAndIpSource.java#L61
* https://github.com/apache/jmeter/blob/09c3f810dda7efaf1510ac062454d978d90a0741/src/protocol/http/src/test/java/org/apache/jmeter/protocol/http/sampler/TestDecompression.java#L87
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@jmeter.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [I] JMeter does not comply with RFC9110#15.4.8(307 Temporary Redirect) [jmeter]
Posted by "dlwldnjs1009 (via GitHub)" <gi...@apache.org>.
dlwldnjs1009 commented on issue #6080:
URL: https://github.com/apache/jmeter/issues/6080#issuecomment-4071716800
Hello, I ran into this issue as well and put together a PR that addresses it: #6658
It builds on the original patch with a few adjustments:
- 308 is also handled (RFC 7538 §3 has the same method preservation requirement)
- the call site in `followRedirects()` uses `lastRes.getResponseCode()` instead
of `res.getResponseCode()`, which matters for mixed redirect chains like 307 →
301
- added WireMock-based tests covering method preservation for all redirect codes
and a multi-hop chain scenario
Happy to adjust anything if needed.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@jmeter.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org