websocket: bad handshake 403 Forbidden #955
Replies: 3 comments
-
Print the response body to see if that gives a hint about the problem. I tried that, but cannot reproduce the bug. The following program prints
|
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
-
It looks like the request was denied by the Cloudflare bot detector, but I am not 100% sure of that. To get past the detector, try adding a User-Agent request header that matches one of the programs that does work. Print the response headers as below. Perhaps there's something useful there, but I doubt it.
The program works for me and will probably work for others who try to debug it. |
Beta Was this translation helpful? Give feedback.
-
Is there an existing issue for this?
Current Behavior
1.golang implementation code
request header:
`Connection: Upgrade
Sec-WebSocket-Key: w8Nxuu9f9XmCGhjx8JGCbQ==
Sec-WebSocket-Version: 13
Origin: https://wspap.okx.com
Sec-WebSocket-Extensions: permessage-deflate; server_no_context_takeover; client_no_context_takeover
Upgrade: websocket
`
Origin: Plus or minus, it's 403
2 python code, python code is normal:
3. postman is normal, too
Expected Behavior
No response
Steps To Reproduce
No response
Anything else?
No response
Beta Was this translation helpful? Give feedback.
All reactions