googollee / go-socket.io

socket.io library for golang, a realtime application framework.
Other
5.74k stars 836 forks source link

Additional bytes in HTTP handshake #623

Closed steve-nester-uk closed 16 hours ago

steve-nester-uk commented 9 months ago

Describe the bug I'm trying to test socket.io with GoLang v1.7.0. The client is making the HTTP request to establish the connection but it's failing. Upon inspecting the http request in browser tools, I can see additional bytes in response. After adding Gin middleware to expect the being returned by the server, I can confirm the server is sending these additional bytes.

image image

After a while the server is outputting "meet error: write: timeout", which is presumably because it is waiting for the client to respond.

To Reproduce Server side:

Client side: React npm install socket.io-client

Expected behavior There should not be additional bytes in front of the JSON.

Environment (please complete the following information):

Additional context Add any other context about the problem here.

dirname commented 7 months ago

use "socket.io-client": "^2.5.0" instead.

googollee commented 16 hours ago

archived.