-
Notifications
You must be signed in to change notification settings - Fork 70
Wrong headers #47
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
Comments
How about resetting $_SERVER at the beginning of the method? |
I don't think that resetting superglobal is ok. And, furthermore, Symfony ServerBag uses it to populate headers. |
Yes, this is an issue, because $_SERVER should contain always only headers from the $request, not from the first php bootstrap. We need to reset it anyways. |
This commit fixes this php-pm/php-pm@9b63b99. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi! We have recently megred #46, but unfortunately, it brings a bug. When we call "add" method
https://github.com/php-pm/php-pm-httpkernel/blob/master/Bridges/HttpKernel.php#L183, we add headers from React request, but we can not track headers which were added by Symfony request from ServerBag. As it uses superglobal array $_SERVER, which only grows during application lifetime. For example:
I send regular http request, after that I send ajax request, all furtherst requests will have X-Request-With: XMLHttpRequest header. My propose is to return replace method, but move authorization headers from $_SERVER to $headers.
The text was updated successfully, but these errors were encountered: