msg357399 - (view) |
Author: JIanqiu Tao (zkonge) * |
Date: 2019-11-24 17:04 |
In Python 3.8+, when we run the http.server in a PC that support IPv6, it will bind IPv6 socket normally. On Linux or some other platforms, it also bind IPv4, that's pretty good, but on Windows, it doesn't work and "--bind 0.0.0.0" have to be provided to make it works in IPv4 environment. In another case, once someone only want the http.server provide service in IPv6 environment, but linux will still bind IPv4 socket automatically. Could we add a argument such as "--ipv6-only" for http.server and open the support of Dual-Stack socket by default? |
|
|
msg357401 - (view) |
Author: JIanqiu Tao (zkonge) * |
Date: 2019-11-24 17:50 |
"--no-dual-stack" seems to be a better argument name. "--ipv6-only" lead to ambiguity in a IPv4 only environment. |
|
|
msg359378 - (view) |
Author: Jason R. Coombs (jaraco) *  |
Date: 2020-01-05 20:03 |
In , I've done a good deal of investigation on this issue and confirmed your findings - on Windows, the server fails to bind dual stack on Windows, but instead binds IPV6ONLY. That needs to be fixed such that the default is to bind dual-stack. Adding dual-stack control is a new feature and should be considered separately. |
|
|
msg359399 - (view) |
Author: Jason R. Coombs (jaraco) *  |
Date: 2020-01-06 03:32 |
New changeset ee94bdb0598f9bc47d6a49e58fffc97aa617be96 by Jason R. Coombs in branch 'master': bpo-38907: In http.server script, restore binding to IPv4 on Windows. (GH-17851) https://github.com/python/cpython/commit/ee94bdb0598f9bc47d6a49e58fffc97aa617be96 |
|
|
msg359419 - (view) |
Author: Jason R. Coombs (jaraco) *  |
Date: 2020-01-06 12:34 |
New changeset 5ed9d60bc53e2eb0a88f07d5afe5299acdc0b216 by Jason R. Coombs (Miss Islington (bot)) in branch '3.8': bpo-38907: In http.server script, restore binding to IPv4 on Windows. (GH-17851) (#17854) https://github.com/python/cpython/commit/5ed9d60bc53e2eb0a88f07d5afe5299acdc0b216 |
|
|
msg359422 - (view) |
Author: Jason R. Coombs (jaraco) *  |
Date: 2020-01-06 12:59 |
New changeset 7cdc31a14c824000cbe8b487900c9826a33f6940 by Jason R. Coombs in branch 'master': bpo-38907: Suppress any exception when attempting to set V6ONLY. (GH-17864) https://github.com/python/cpython/commit/7cdc31a14c824000cbe8b487900c9826a33f6940 |
|
|
msg359424 - (view) |
Author: Jason R. Coombs (jaraco) *  |
Date: 2020-01-06 13:28 |
New changeset 33cb4a62bf6848093b7a05c9794582d204798b1b by Jason R. Coombs (Miss Islington (bot)) in branch '3.8': bpo-38907: Suppress any exception when attempting to set V6ONLY. (GH-17864) (GH-17865) https://github.com/python/cpython/commit/33cb4a62bf6848093b7a05c9794582d204798b1b |
|
|
msg359425 - (view) |
Author: Jason R. Coombs (jaraco) *  |
Date: 2020-01-06 13:30 |
In PR 17378, we discussed and I believe the conclusion is that the fix in the other PR(s) is sufficient to address the deficiency. |
|
|