Re: [ws4py] wsgirefserver throws an assertion error on connection

25 views
Skip to first unread message

Sylvain Hellegouarch

unread,
Sep 9, 2013, 3:29:37 PM9/9/13
to ws...@googlegroups.com
Hi there,

So sorry for this late reply but I was away. You're right, it's a bug and I just fixed it.


Thanks for this.


On Tue, Aug 27, 2013 at 12:02 PM, ThinkChaos <thin...@gmail.com> wrote:
Hello,

I want to use ws4py as the link between a javascript web app and a python daemon.
I'm using the stock wsgirefserver, and this html:
<html>
  <head>
    <script>
      var socket = new WebSocket('ws://localhost:9000/');
    </script>
  </head>
</html>

On connection, an assertion error gets thrown:
Traceback (most recent call last):
  File "/usr/lib/python2.7/wsgiref/handlers.py", line 85, in run
    self.result = application(self.environ, self.start_response)
  File "/home/plg/documents/websocks/ws4py/server/wsgiutils.py", line 153, in __call__
    start_response("101 Switching Protocols", upgrade_headers)
  File "/usr/lib/python2.7/wsgiref/handlers.py", line 178, in start_response
    assert type(val) is StringType,"Header values must be strings"
AssertionError: Header values must be strings

Is this normal?

--
You received this message because you are subscribed to the Google Groups "ws4py" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ws4py+un...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.



--
- Sylvain
http://www.defuze.org
http://twitter.com/lawouach
Reply all
Reply to author
Forward
0 new messages