8000 [WebServer] Allow * to bind all interfaces (as INADDR_ANY) by jpauli · Pull Request #23320 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

Conversation

@jpauli
Copy link
@jpauli jpauli commented Jun 28, 2017
Q A
Branch? 3.4
Bug fix? no
New feature? yes
BC breaks? no
Deprecations? no
Tests pass? no-tests
Fixed tickets ~
License MIT
Doc PR

In Python and elsewhere, binding to '*' means '0.0.0.0' (INADDR_ANY). I just added that to WebServer command.

$this->port = $this->findBestPort();
} elseif (false !== $pos = strrpos($address, ':')) {
$this->hostname = substr($address, 0, $pos);
if ($this->hostname == '*') {
Copy link
Contributor

Choose a reason for hiding this comment

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

'*' === $this->hostname instead?

Copy link
Member
@stof stof Jun 28, 2017

Choose a reason for hiding this comment

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

Comparison must be strict indeed.

Copy link
Member
@stof stof left a comment

Choose a reason for hiding this comment

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

You also need to support * in the else clause when the port is not specified

3.4.0
-----

* 'WebServer can now use '*' as a wildcard to bind to 0.0.0.0 (INADDR_ANY)
Copy link
Member

Choose a reason for hiding this comment

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

you have an extra quote at the beginning. and the value should use backticks to make it a Markdown code span (especially given that * is a special char otherwise)

$this->port = $this->findBestPort();
} elseif (false !== $pos = strrpos($address, ':')) {
$this->hostname = substr($address, 0, $pos);
if ($this->hostname == '*') {
Copy link
Member
@stof stof Jun 28, 2017

Choose a reason for hiding this comment

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

Comparison must be strict indeed.

@fabpot fabpot changed the base branch from master to 3.4 July 3, 2017 06:52
@fabpot
Copy link
Member
fabpot commented Jul 3, 2017

Thank you @jpauli.

@fabpot fabpot merged commit 1880bcf into symfony:3.4 Jul 3, 2017
fabpot added a commit that referenced this pull request Jul 3, 2017
…ANY) (jpauli, fabpot)

This PR was merged into the 3.4 branch.

Discussion
----------

[WebServer] Allow * to bind all interfaces (as INADDR_ANY)

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | no-tests
| Fixed tickets | ~
| License       | MIT
| Doc PR        |

In Python and elsewhere, binding to '*' means '0.0.0.0'  (INADDR_ANY).  I just added that to WebServer command.

Commits
-------

1880bcf fixed CS
b31ebae Allow * to bind all interfaces (as INADDR_ANY)
This was referenced Oct 18, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants

0