-
-
Notifications
You must be signed in to change notification settings - Fork 21
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
Duplicated port in URI #28
Comments
Could you create a test for this to show it failing? From a quick reread of the code, we should already be handling ports as part of psr7-server/src/ServerRequestCreator.php Lines 256 to 257 in 4d03768
|
Great, it seems to be resolved by pull request #26 . I was using version 0.3.0 without this fix. I will use master for now. |
Can you release a new Version with this fix? Had this issue in a project using your library. |
Hi!
I am getting wrong URI when running on localhost with custom port:
GET http://localhost:8000/
The problem is probably due to mechanism used to create URI in
ServerRequestCreator::createUriFromArray()
. URI host gets populated with$_SERVER['HTTP_HOST']
, but this contains also the port (see for example here: https://stackoverflow.com/a/12046836 ).I propose two solutions:
$_SERVER['HTTP_HOST']
$_SERVER['SERVER_NAME']
instead - I am not sure about the consequencesI may create a pull request with fix if you want.
The text was updated successfully, but these errors were encountered: