Erreurs communes lors de l'envoi de la requête


Messages d'erreurs liés au protocole HTTPS


Le certificat SSL a été refusé
$ curl -s -S -H "x-api-token: XYZ" \
https://broker-module-livedata:50100/api/v2/inventory
curl: (60) SSL certificate problem: unable to get local issuer certificate
…

Cela peut se produire si le certificat du serveur est auto-signé.

Pour contourner la validité de l'émetteur du certificat, il faut utiliser l'option --insecure ( option courte : -k ).

curl --insecure -s -S -H "x-api-token: XYZ" \
https://broker-module-livedata:50100/api/v2/inventory

Avec curl v7.29.0 :

curl: (60) Peer's Certificate issuer is not recognized.

Avec curl v7.60 et supérieur :

curl: (60) SSL certificate problem: unable to get local issuer certificate

Requête HTTP sur un serveur en HTTPS
$ curl -s -S -H "x-api-token: XYZ" \
http://broker-module-livedata:50100/api/v2/inventory
The client IP_SERVEUR:PORT_CLIENT sent a plain HTTP request, 
but this server only speaks HTTPS on this port.

The client IP_SERVEUR:PORT_CLIENT sent a plain HTTP request, but this server only speaks HTTPS on this port.

Requête HTTPS sur un serveur en HTTP
$ curl -s -S -H "x-api-token: XYZ" \
https://broker-module-livedata:50100/api/v2/inventory
curl: (35) error:1408F10B:SSL routines:ssl3_get_record:wrong version number

Avec curl v7.29.0 :

curl: (35) SSL received a record that exceeded the maximum permissible length.

Avec curl v7.60 et supérieur :

curl: (35) error:1408F10B:SSL routines:ssl3_get_record:wrong version number