wandenberg / nginx-push-stream-module

A pure stream http push technology for your Nginx setup. Comet made easy and really scalable.
Other
2.22k stars 295 forks source link

EventSource and long polling interference #105

Closed AlexeyKupershtokh closed 10 years ago

AlexeyKupershtokh commented 10 years ago

I've been playing with the module today.

Sent a lot of similar messages with content {"Notification":{1}}.

Noticed that if 1) I subscribe via EventSource on the /sub-ev 2) send and get some events. 3) connect using another /sub-lp location with long polling 4) then I get messages both formatted as EventSource and plain:

< HTTP/1.1 200 OK
< Server: nginx/1.0.11
< Date: Wed, 30 Oct 2013 10:31:15 GMT
< Content-Type: text/plain
< Transfer-Encoding: chunked
< Connection: keep-alive
< Last-Modified: Wed, 30 Oct 2013 10:21:33 GMT
< Expires: Thu, 01 Jan 1970 00:00:01 GMT
< Cache-Control: no-cache, no-store, must-revalidate
< Etag: 0
< Transfer-Encoding: chunked
< 
1e
data: {"Notification":{1}}

1e
data: {"Notification":{1}}

1e
data: {"Notification":{1}}

16
{"Notification":{1}}

16
{"Notification":{1}}

16
{"Notification":{1}}
...

This is rarely would be a real case, but I think it's better to fix it too.

wandenberg commented 10 years ago

Could you share your server configuration and what nginx/module versions are using? How to systematically reproduce the problem?

AlexeyKupershtokh commented 10 years ago

Sorry, can't reproduce any more. I'll reopen the issue if I meet this strangeness one more time.