Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Redirection fails on multiple status values #15737 #15738
Pull Request for Issue #15737 .
Summary of Changes
Fixed JApplicationWeb to generate the redirection headers with the same headers API that it is called on respond().
Now, it is generating the headers adding them as a raw header. If the there's an extra Status (e.g. a 201 defined with setHeader), it replaces the 303.
Test that all redirections work Ok. For example, when items are saved.
This issue was discovered with an extension running on FOF2 (the controller defined a Status 201 and, in a second step, calls a redirection). So, any extension running FOF2 is also a good test (save items).
All redirections work OK.
When multiple statuses are defined, the 303 redirection is lost and the status defined with setHeader('Status'... overrides any previous header('HTTP 1.1 303 See other');
Documentation Changes Required
referenced this pull request
May 2, 2017
Hi @wilsonge ,
I've just fixed the issues on the unit tests. Some notes:
This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/15738.
Would be good to have more tests, if someone needs a component, this one http://babioon.com/en/component/ars/repository/babioon-event/babioon-event-3-0-0/babioon-event-3-0-0.html fails