in windows Curl command , the below bulk import will throw the exception
C:\elasticsearch-8.12.2>curl -XPOST "https://localhost:9200/products/_bulk" -H "Content-Type: application/json" --data-binary "@products-bulk.json"
Error: curl: (52) Empty reply from server
Solution :
Use the cacert and -insecure and -u uid:pwd added to your curl command.
I tested and is working fine for me in Windows
curl --cacert config/certs/http_ca.crt --insecure -u elastic:l9RyDpzFJ7TBwhC06e9E -XPOST "https://localhost:9200/products/_bulk" -H "Content-Type: application/json" --data-binary "@products-bulk.json"