Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bad Request response for https via curl request #247

Open
aufalkhlq opened this issue Dec 11, 2023 · 1 comment
Open

Bad Request response for https via curl request #247

aufalkhlq opened this issue Dec 11, 2023 · 1 comment

Comments

@aufalkhlq
Copy link

Don't work https via curl.

upgrade:websocket: the client is not using the websocket protocol: 'upgrade' token not found in 'Connection' header

Go version : 1.21.3

@lorenzodonini
Copy link
Owner

More details are needed, such as the exact setup and parameters being passed to curl.

A simple websocket upgrade via curl example works just fine:

curl -v --include \
     --no-buffer \
     --header "Connection: Upgrade" \
     --header "Upgrade: websocket" \
     --header "Host: localhost:8887" \
     --header "Sec-WebSocket-Key: SGVsbG8sIHdvcmxkIQ==" \
     --header "Sec-WebSocket-Version: 13" \
     --header "Sec-WebSocket-Protocol: ocpp1.6" http://localhost:8887/client1

Adding the TLS should just be a matter of setting up the correct certificates.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants