Skip to content

Conversation

@dg
Copy link
Member

@dg dg commented Jun 13, 2017

  • bug fix? yes
  • new feature? no
  • BC break? no

This should prevent to create links like https://example.com:80

@dg
Copy link
Member Author

dg commented Jun 13, 2017

@grongor can you help me to add test to RequestFactory.scheme.phpt?

@grongor
Copy link
Contributor

grongor commented Jun 13, 2017

@dg I hope this is what you expected :) dg#1 It should do the job ...

@dg
Copy link
Member Author

dg commented Jun 13, 2017

@grongor thanks!

@dg dg closed this in 08df9ae Jun 13, 2017
dg added a commit that referenced this pull request Jun 13, 2017
…vailable, uses default port [Closes #124]

thanks to @grongor for test
} else {
if (!empty($_SERVER['HTTP_X_FORWARDED_PROTO'])) {
$url->setScheme(strcasecmp($_SERVER['HTTP_X_FORWARDED_PROTO'], 'https') === 0 ? 'https' : 'http');
$url->setPort($url->getScheme() === 'https' ? 443 : 80);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wow, it's great, I can remove theses lines.

contributte/componette-dockerfiles@10a4511

grongor referenced this pull request Jun 14, 2017
Also added SERVER_NAME in order to prevent port being based on the scheme.
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 this pull request may close these issues.

3 participants