-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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
[Documentation and/or web.run_app] Default host is 0.0.0.0 #3453
Comments
GitMate.io thinks the contributor most likely able to help you is @asvetlov. Possibly related issues are #120 (Documentation), #2591 (Documentation for server BaseRequest.host() is wrong), #2739 (Accept a coroutine in web.run_app), #1940 (Content length is 0 by default in aiohttp.web.Response), and #3243 (Enable stdout logging in run_app by default). |
I believe one socket per one runner's site is a good idea. |
I'd at least document that change of behavior, while subtle, where suggesting to use Application Runners instead. Figured that'd be the want though |
@coxley pull request for docs update is welcome! |
Long story short
Warnings for moving away from
make_handler
suggest Application Runners as the replacementmake_handler
returned a protocol factory. This factory could be provided toloop.create_server
loop.create_server
whenhost=None
assumes all interfaces and will return multiple sockets (usually one for each address family)Both
web.run_app
andweb.TCPSite
whenhost=None
assume0.0.0.0
web.run_app
states:0.0.0.0
is not inclusive of "all hosts" unless in an IPv4-only environmentExpected behaviour
Two sockets created per port/
TCPSite
, matching (or at least getting close) the event loop behavior. Usinghost=localhost
does the correct thing in my environmentsActual behaviour
One socket is created per
TCPSite
for 0.0.0.0Steps to reproduce
Output:
Your environment
Linux, 4.11
The text was updated successfully, but these errors were encountered: