[Calypso] IPv6 support
Dominik 'Rathann' Mierzejewski
dominik at greysector.net
Sat Mar 21 15:17:02 PDT 2020
On Saturday, 21 March 2020 at 18:54, Keith Packard wrote:
> Dominik 'Rathann' Mierzejewski <dominik at greysector.net> writes:
>
> > It looks like it's related to https://bugs.python.org/issue24209, which
> > is fixed in python 3.8. I'm running python 3.7 :(.
>
> I'm not sure there's a fix which we could apply to Calypso to make it
> work? If there is, I'd be happy to merge one.
I applied the following quick&dirty patch locally, based on
https://stackoverflow.com/questions/25817848/python-3-does-http-server-support-ipv6
Regards,
Dominik
--
Fedora https://getfedora.org | RPM Fusion http://rpmfusion.org
There should be a science of discontent. People need hard times and
oppression to develop psychic muscles.
-- from "Collected Sayings of Muad'Dib" by the Princess Irulan
-------------- next part --------------
diff -up calypso-2.0/calypso/__init__.py.orig calypso-2.0/calypso/__init__.py
--- calypso-2.0/calypso/__init__.py.orig 2020-03-02 18:15:00.000000000 +0100
+++ calypso-2.0/calypso/__init__.py 2020-03-21 23:16:44.605308292 +0100
@@ -56,10 +56,16 @@ ch.setFormatter (formatter)
log.addHandler(ch)
negotiate = gssapi.Negotiate(log)
-http_server = server.HTTPServer
+class HTTPServerV6(server.HTTPServer):
+ address_family = socket.AF_INET6
+
+http_server = HTTPServerV6
try:
from http.server import ThreadingHTTPServer
- http_server = server.ThreadingHTTPServer
+ class ThreadingHTTPServerV6(server.ThreadingHTTPServer):
+ address_family = socket.AF_INET6
+
+ http_server = ThreadingHTTPServerV6
except ImportError:
pass
@@ -99,7 +105,7 @@ def _check(request, function):
# pylint: enable=W0212
-class HTTPServer(server.HTTPServer):
+class HTTPServer(HTTPServerV6):
"""HTTP server."""
PROTOCOL = "http"
More information about the Calypso
mailing list