Closed
Description
Q | A |
---|---|
Bug report? | yes |
Feature request? | no |
BC Break report? | maybe |
RFC? | no |
Symfony version | 2.8.35 |
Redirecting to the correct scheme seems to be broken for POST requests. Possibly related to either
#26312 or #26100
This routing.yml example
test1:
path: /foo
defaults: { _controller: AppBundle:Api:foo }
schemes: https
test2:
path: /foo2
defaults: { _controller: AppBundle:Api:foo }
methods: GET
schemes: https
test3:
path: /foo3
defaults: { _controller: AppBundle:Api:foo }
methods: POST
schemes: https
leads to:
$ http GET http://myhost/foo --headers
HTTP/1.1 301 Moved Permanently
$ http GET http://myhost/foo2 --headers
HTTP/1.1 301 Moved Permanently
$ http POST http://myhost/foo3 --headers
HTTP/1.1 404 Not Found
I'm aware of the potential issues with redirecting POST requests, but up to symfony 2.8.34 all three examples where redirected to the expected scheme. In fact this was caught by a controller test expecting a 301.
I'm using HTTPie for the examples here, but using curl leads to the same results.