question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

HTTP eventsource GET / hr_streaming POST mass call

See original GitHub issue

Version: 6.1.0

Environment:

  • Operating system: server Debian 8

  • Browser: Mac OS X 10.10 / Firefox 58.0

  • Node.js: v6.11.3

Steps to reproduce: not able to reproduce - this behavior appear sometimes

Hello guys,

I recently saw in my Nginx (with a nodejs/express/primus/ sockJS as upstream over HTTPS) logs that sometimes Primus browser clients spam my server logs with a lot of http call. The log extract below is made multiples times per second. After having a look at Primus source code, i saw a reference on /xhr_streaming to CORS cross browser compatibility check for XHR but i am not sure that this behavior refer to this as i am not concern with CORS case. All HTTP calls are made from the same origin.

x.x.x.x - - [27/Feb/2018:21:11:07 +0000] "GET /primus/589/vlnmgpne/eventsource?_user=3067bf39-f689-4142-a84d-ab550586d7fc&name=username&client=web&_primuscb=M7Nv3j1 HTTP/1.1" 200 52 "https://iamthereferer.com" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:58.0) Gecko/20100101 Firefox/58.0"
x.x.x.x - - [27/Feb/2018:21:11:07 +0000] "POST /primus/589/kh1wldtk/xhr_streaming?_user=3067bf39-f689-4142-a84d-ab550586d7fc&name=username&client=web&_primuscb=M7Nv3j1&t=1519765801749 HTTP/1.1" 200 2092 "https://iamthereferer.com" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:58.0) Gecko/20100101 Firefox/58.0"
x.x.x.x - - [27/Feb/2018:21:11:07 +0000] "POST /primus/589/kh1wldtk/xhr_streaming?_user=3067bf39-f689-4142-a84d-ab550586d7fc&name=username&client=web&_primuscb=M7Nv3j1&t=1519765801816 HTTP/1.1" 200 2092 "https://iamthereferer.com" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:58.0) Gecko/20100101 Firefox/58.0"
x.x.x.x - - [27/Feb/2018:21:11:07 +0000] "POST /primus/589/kh1wldtk/xhr_streaming?_user=3067bf39-f689-4142-a84d-ab550586d7fc&name=username&client=web&_primuscb=M7Nv3j1&t=1519765801885 HTTP/1.1" 200 2092 "https://iamthereferer.com" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:58.0) Gecko/20100101 Firefox/58.0"
x.x.x.x - - [27/Feb/2018:21:11:07 +0000] "POST /primus/589/kh1wldtk/xhr_streaming?_user=3067bf39-f689-4142-a84d-ab550586d7fc&name=username&client=web&_primuscb=M7Nv3j1&t=1519765801952 HTTP/1.1" 200 2092 "https://iamthereferer.com" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:58.0) Gecko/20100101 Firefox/58.0"

Can anyone give me a tip to understand if this is a normal behavior and why this happen ?

In a normal usage of Websocket with Primus i did never see those http call before.

thank you for the help

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:11 (7 by maintainers)

github_iconTop GitHub Comments

6reactions
brycekahlecommented, May 29, 2018

sockjs-client 1.1.5 released

2reactions
lpincacommented, May 30, 2018

Fixed by 041f3abe7c3c34cbf7b820df693b00c211f48b1c.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Can Server Sent Events (SSE) with EventSource pass ...
Another approach is to POST all the data in beforehand, and store it in an HttpSession , and then call the SSE process,...
Read more >
Using server-sent events - Web APIs | MDN
Receiving events from the server. The server-sent event API is contained in the EventSource interface; to open a connection to the server to ......
Read more >
Stream Updates with Server-Sent Events - web.dev
If the URL passed to the EventSource constructor is an absolute URL, its origin (scheme, domain, port) must match that of the calling...
Read more >
The Pitfalls of EventSource over HTTP/1.1 - text/plain
Implementing the server side is almost as simple: your handler just prefaces each piece of data it wants to send to the client...
Read more >
Server Sent Events - The Modern JavaScript Tutorial
Besides, it's a plain old HTTP, not a new protocol. Getting messages. To start receiving messages, we just need to create new EventSource(url)...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found