Description
Q | A |
---|---|
RFC? | yes |
Symfony version | master |
As far as I understand, RFC 7231 §6.4.2 states that 301 HTTP Code should forward POST requests to the Location URI.
But, it also states that:
For historical reasons, a user agent MAY change the request method from POST to GET for the subsequent request.
This is the behavior implemented in almost all user agents (Chrome, Firefox, IE, curl, as far as I tested).
However, the BrowserKit is not implemented this way. It forwards the request to the Location URI with the same method as the source one.
The source code related is here: src/Symfony/Component/BrowserKit/Client.php#L477.
As it can break some websites when crawling them, do you think it has to be changed ? Is there a way to force the browser kit to not forward the POST request ?