pesaply / mplh5canvas

Automatically exported from code.google.com/p/mplh5canvas
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

Standalone server example scripts broken with mod_pywebsocket 0.7.7 and later #18

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
None of the example scripts (for instance, single_plot.py) work for me unless I 
use version 0.7.6 or older of mod_pywebsocket. With version 0.7.7 or later of 
mod_pywebsocket, I get a traceback that looks like this:

[2013-05-14 22:01:43,653] [WARNING] mplh5canvas.simple_server: 
'_StandaloneRequest' object has no attribute 'protocol'
[2013-05-14 22:01:43,654] [WARNING] mplh5canvas.simple_server: Traceback (most 
recent call last):
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/mplh5canvas/simple_server.py", line 421, in parse_request
    strict=self._options.strict)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/mod_pywebsocket/handshake/__init__.py", line 90, in do_handshake
    handshaker.do_handshake()
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/mod_pywebsocket/handshake/hybi.py", line 137, in do_handshake
    check_request_line(self._request)
  File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/mod_pywebsocket/handshake/_base.py", line 178, in check_request_line
    if request.protocol != 'HTTP/1.1':
AttributeError: '_StandaloneRequest' object has no attribute 'protocol'

It looks like mplh5canvas.simple_server is behind in some API changes in 
mod_pywebsocket.

This is on Mac OS 10.8.3 (Mountain Lion) and Python 2.7.3 installed from 
MacPorts. In fact, I came across this bug while preparing MacPorts packages for 
mplh5canvas and its dependencies mod_pywebsocket and netifaces.

Original issue reported on code.google.com by doc.aron...@gmail.com on 15 May 2013 at 5:18

GoogleCodeExporter commented 9 years ago
Fixed in revision 43. The request handler now sets the HTTP protocol to 1.1.

Original comment by ludwig.s...@gmail.com on 15 Jul 2013 at 3:11