Skip to content
Snippets Groups Projects
Commit 99d6a6b2 authored by Thomas Müller's avatar Thomas Müller
Browse files

Merge pull request #22497 from owncloud/fix-redirect-response

set correct http status code in redirect response
parents 73d46afc ec6e8c1a
No related merge requests found
......@@ -44,7 +44,7 @@ class RedirectResponse extends Response {
*/
public function __construct($redirectURL) {
$this->redirectURL = $redirectURL;
$this->setStatus(Http::STATUS_TEMPORARY_REDIRECT);
$this->setStatus(Http::STATUS_SEE_OTHER);
$this->addHeader('Location', $redirectURL);
}
......
......@@ -43,7 +43,7 @@ class RedirectResponseTest extends \Test\TestCase {
public function testHeaders() {
$headers = $this->response->getHeaders();
$this->assertEquals('/url', $headers['Location']);
$this->assertEquals(Http::STATUS_TEMPORARY_REDIRECT,
$this->assertEquals(Http::STATUS_SEE_OTHER,
$this->response->getStatus());
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment