diff --git a/daphne/server.py b/daphne/server.py index d561eec..7b171b2 100755 --- a/daphne/server.py +++ b/daphne/server.py @@ -4,6 +4,7 @@ import warnings from twisted.internet import reactor, defer from twisted.internet.endpoints import serverFromString from twisted.logger import globalLogBeginner, STDLibLogObserver +from twisted.web import http from .http_protocol import HTTPFactory @@ -84,6 +85,12 @@ class Server(object): else: globalLogBeginner.beginLoggingTo([STDLibLogObserver(__name__)]) + # Detect what Twisted features are enabled + if http.H2_ENABLED: + logger.info("HTTP/2 support enabled") + else: + logger.info("HTTP/2 support not enabled (install the http2 and tls Twisted extras)") + # Disabled deliberately for the moment as it's worse performing if "twisted" in self.channel_layer.extensions and False: logger.info("Using native Twisted mode on channel layer") diff --git a/setup.py b/setup.py index 5d3147c..2f96759 100755 --- a/setup.py +++ b/setup.py @@ -24,7 +24,7 @@ setup( include_package_data=True, install_requires=[ 'asgiref>=1.0.0', - 'twisted>=16.0', + 'twisted>=17.0', 'autobahn>=0.12', ], extras_require={