[PKG-Openstack-devel] Bug#863599: python-autobahn: twisted WebSocketResource don't work against twisted 16.6.0 (upstream bug #701)
Goetz, Philippe
Philippe.Goetz at siemens.com
Mon May 29 05:02:31 UTC 2017
Package: python-autobahn
Version: 0.14.1+dfsg1-2
Severity: important
Dear Maintainer,
Under stretch, when using autobahn.twisted.resource.WebSocketResource no onMessage is received.
This is a known upstream issue https://github.com/crossbario/autobahn-python/issues/701
Several commits has been made to fix it.
Here the git diff for the patch from https://github.com/crossbario/autobahn-python.git
(which has been successfully been tested):
git diff v0.14.1..64693e4693eeeda50bc781bdce4d4dba3172ebf5 -- autobahn/twisted/resource.py
diff --git a/autobahn/twisted/resource.py b/autobahn/twisted/resource.py
index 79d979f4..cb3b7b23 100644
--- a/autobahn/twisted/resource.py
+++ b/autobahn/twisted/resource.py
@@ -126,7 +126,7 @@ class WebSocketResource(object):
# Take over the transport from Twisted Web
#
- transport, request.transport = request.transport, None
+ transport, request.channel.transport = request.channel.transport, None
# Connect the transport to our protocol. Once #3204 is fixed, there
# may be a cleaner way of doing this.
@@ -139,6 +139,12 @@ class WebSocketResource(object):
transport.protocol = protocol
protocol.makeConnection(transport)
+ # On Twisted 16.3.0+, the transport is paused whilst the existing
+ # request is served; there won't be any requests after us so we can
+ # just resume this ourselves.
+ if hasattr(transport, "resumeProducing"):
+ transport.resumeProducing()
+
# We recreate the request and forward the raw data. This is somewhat
# silly (since Twisted Web already did the HTTP request parsing
# which we will do a 2nd time), but it's totally non-invasive to our
-- System Information:
Debian Release: 9.0
APT prefers testing
APT policy: (500, 'testing')
Architecture: amd64
(x86_64)
Kernel: Linux 4.9.0-2-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
Versions of packages python-autobahn depends on:
ii python-cbor 0.1.24-1+b1
ii python-concurrent.futures 3.0.5-3
ii python-lz4 0.8.2+dfsg-2
ii python-msgpack 0.4.8-1
ii python-nacl 1.0.1-2
ii python-qrcode 5.3-1
ii python-six 1.10.0-3
ii python-snappy 0.5-1.1
ii python-trollius 2.1~b1-4
ii python-twisted 16.6.0-2
ii python-txaio 2.5.1+2016.10.03.git.623ef68776-1
ii python-zope.interface 4.3.2-1
pn python:any <none>
python-autobahn recommends no packages.
python-autobahn suggests no packages.
-- no debconf information
With best regards,
Philippe Goetz
Siemens AG
Building Technologies Division
Solution and Service Portfolio
Danger Management System
BT SSP SOL R&D CI DMS
Siemensallee 84
76187 Karlsruhe, Germany
mailto:philippe.goetz at siemens.com
Siemens Aktiengesellschaft: Chairman of the Supervisory Board: Gerhard Cromme; Managing Board: Joe Kaeser, Chairman, President and Chief Executive Officer; Roland Busch, Lisa Davis, Klaus Helmrich, Janina Kugel, Cedrik Neike, Michael Sen, Ralf P. Thomas; Registered offices: Berlin and Munich, Germany; Commercial registries: Berlin Charlottenburg, HRB 12300, Munich, HRB 6684; WEEE-Reg.-No. DE 23691322
More information about the Openstack-devel
mailing list