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

parseRequestURI dose not override globals['server'] ? #3976

Closed
bananacoffee opened this issue Dec 10, 2020 · 1 comment · Fixed by #4651
Closed

parseRequestURI dose not override globals['server'] ? #3976

bananacoffee opened this issue Dec 10, 2020 · 1 comment · Fixed by #4651

Comments

@bananacoffee
Copy link

bananacoffee commented Dec 10, 2020

When $_SERVER['QUERY_STRING'] is override at parseRequestURI.

# system/HTTP/IncomingRequest.php
if (trim($uri, '/') === '' && strncmp($query, '/', 1) === 0)
{
	$query                   = explode('?', $query, 2);
	$uri                     = $query[0];
	$_SERVER['QUERY_STRING'] = $query[1] ?? '';
}
else
{
	$_SERVER['QUERY_STRING'] = $query;
}

Then $_SERVER['QUERY_STRING'] returns new value but $request->getServer('QUERY_STRING') returns old value.

Is this the correct behavior?

@MGatner
Copy link
Member

MGatner commented May 8, 2021

This is indeed a bug. I'm working on the URI class (and detection in general) and I will keep this in mind.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants