lorenzodonini / ocpp-go

Open Charge Point Protocol implementation in Go

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Bad Request response for https via curl request

aufalkhlq opened this issue · comments

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

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.