sockjs/sockjs-protocol — Issue #40: Test suite hangs on preludes
Author: marekjelen
Created: 2012-01-29 08:22:53+00:00
State: open

Hi,

I got a weird problem. The test suite hangs on any transport that tests for prelude. Example for Eventsource

```
File "sockjs-protocol-0.2.py", line 929, in test_response_limit
self.assertTrue(r.read()) # prelude
File "/sockjs-protocol/utils.py", line 65, in read
data = self.res.read(10240)
File "httplib.py", line 561, in read
s = self.fp.read(amt)
File "/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/socket.py", line 351, in read
data = self._sock.recv(left)
```

I tried testing Node.js server and there wasn't such problem.

What I telnet the server, I get the response right away

```
GET /echo/000/642c3ab9-c850-418b-87bf-1ec381186467/eventsource HTTP/1.1
Host: localhost:8081
Accept-Encoding: identity

HTTP/1.1 200 OK
Access-Control-Allow-Credentials: true
Access-Control-Allow-Origin: http://localhost
Connection: keep-alive
Set-Cookie: JSESSIONID=dummy;path=/
Content-Type: text/event-stream; charset=UTF-8
Cache-Control: no-store, no-cache, must-revalidate, max-age=0

data: o

data: a[]

```

What's there I can not see?