curl / Mailing Lists / curl-users / Single Mail
Buy commercial curl support from WolfSSL. We help you work out your issues, debug your libcurl applications, use the API, port to new platforms, add new features and more. With a team lead by the curl founder himself.

Re: Webservices Help

From: Dan Fandrich via curl-users <>
Date: Wed, 18 Nov 2020 11:10:58 -0800

On Wed, Nov 18, 2020 at 05:00:14PM +0100, Kepa (Lan-1000 S.L.) via curl-users wrote:
> I have tried to do this with crul but it does not connect to the service
> correctly. The curl shipping is as follows:
> curl.exe -X POST  -i -H "Expect:" -H "Accept-Encoding:gzip" -H "Content-Encoding:gzip" -H "Content-Length:37430" -H "Content-Type:application/octet-stream" -H "eus-bizkaia-n3-version:1.0" -H "eus-bizkaia-n3-content-type:application/xml" -H "eus-bizkaia-n3-data:" -d _at_sarrerak_header_info.json -d _at_[NAME OF FILE TO SEND] --insecure --key key.pem --cacert firma.pem --cert client.pem: [CERTIFICATE KEY] -o resultado.html

Several of these options are just going to cause confusion and problems. More specifically,
"Content-Encoding:gzip" could mess up the way the server decodes the data. But
all of -X POST -H "Expect:" -H "Accept-Encoding:gzip" -H
"Content-Encoding:gzip" -H "Content-Length:37430" should be removed. Also,
--insecure is never a good idea but in this case it entirely overrides --cacert
firma.pem. Use -v or one of the --trace options to see exactly what this command is sending
to the server to make sure it's in the format it wants. The error you're seeing comes from the
remote side, so the problem is likely in the way you're using curl to format
the request.

Received on 2020-11-18