da6f190a6b
This PR was squashed before being merged into the master branch (closes #8025).
Discussion
----------
[BrowserKit] should not follow redirects if status code is not 30x
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | yes
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | -
| License | MIT
| Doc PR | -
Currently, BrowserKit operates incorrectly. It follows "redirect" when `Location` header is present, but having just the header is not enough to perform redirection. [RFC-2616](http://tools.ietf.org/html/rfc2616#section-14.30) precisely says that the redirection should be performed only with `30x` status codes.
This PR fixes the incorrect behaviour of BrowserKit and make it consist with both the RFC document and with other clients, used for example with Behat.
I've found the issue while testing my application with Behat. I was returning `Location` header with `HTTP 201/Created` status code and was surprised that BrowserKit follows the redirection.
This PR is for 2.3 version (master) of Symfony.
Commits
-------
|
||
---|---|---|
.. | ||
BrowserKit | ||
ClassLoader | ||
Config | ||
Console | ||
CssSelector | ||
Debug | ||
DependencyInjection | ||
DomCrawler | ||
EventDispatcher | ||
Filesystem | ||
Finder | ||
Form | ||
HttpFoundation | ||
HttpKernel | ||
Intl | ||
Locale | ||
OptionsResolver | ||
Process | ||
PropertyAccess | ||
Routing | ||
Security | ||
Serializer | ||
Stopwatch | ||
Templating | ||
Translation | ||
Validator | ||
Yaml |