Files
metube/app/tests
Alex Shnitman 70d19759e8 fix: accept HOST=* so IPv6 users get a dual-stack bind (closes #795)
aiohttp hands HOST straight to getaddrinfo, which has no notion of a '*'
wildcard: the lookup fails and MeTube dies at startup on an opaque DNS
error. '*' is nevertheless what people reach for when they want to serve
both IP stacks -- it is the answer given on #795 -- while the value that
actually does it, an empty string, is undiscoverable.

asyncio expands an empty host to one listening socket per address family,
so map '*' onto it. Verified against the real stack:

    ''        -> [('0.0.0.0', p), ('::', p, 0, 0)]
    '0.0.0.0' -> [('0.0.0.0', p)]
    '::'      -> [('::', p, 0, 0)]
    '*'       -> gaierror (before this change)

The README claimed the 0.0.0.0 default was "all interfaces", which is
only true of IPv4; document the three modes instead. Note that '::' is
IPv6-only whatever the host's bindv6only says, because asyncio always
sets IPV6_V6ONLY on the sockets it binds.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-21 16:01:30 +02:00
..
2026-03-20 13:12:31 +02:00