Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrong HTTP status code #3558

Closed
nowackipawel opened this issue Aug 28, 2020 · 1 comment
Closed

Wrong HTTP status code #3558

nowackipawel opened this issue Aug 28, 2020 · 1 comment
Labels
bug Verified issues on the current code behavior or pull requests that will fix them

Comments

@nowackipawel
Copy link
Contributor

				->to(route_to('part_by_part_index_part_' . $mode, strtolower($dlc_id)),  301)
				->send();

is returning 307 redirection:

Status307
Temporary Redirect
VersionHTTP/2
Transferred7.79 KB (30.57 KB size)

because of this code:

		// override status code for HTTP/1.1 & higher
		// reference: http://en.wikipedia.org/wiki/Post/Redirect/Get
		if (isset($_SERVER['SERVER_PROTOCOL'], $_SERVER['REQUEST_METHOD']) && $this->getProtocolVersion() >= 1.1)
		{
			if ($method !== 'refresh')
			{
				$code = ($_SERVER['REQUEST_METHOD'] !== 'GET') ? 303 : 307;
			}
		}

so there is no way to redirect with other statuses if we are using Location instead of Refresh header.

I will prepare PR in minutes.

@nowackipawel nowackipawel added the bug Verified issues on the current code behavior or pull requests that will fix them label Aug 28, 2020
@nowackipawel
Copy link
Contributor Author

To be closed.
It is fixed in current repo.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Verified issues on the current code behavior or pull requests that will fix them
Projects
None yet
Development

No branches or pull requests

1 participant