curl / Mailing Lists / curl-library / 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: Curl vs libcurl

From: Patrick Schlangen via curl-library <>
Date: Wed, 20 Oct 2021 09:52:47 +0000

Am 20.10.2021 um 11:38 schrieb Brian Meekings via curl-library <>:
> The GET request looks the same in both to me, so why does one succeed, and the other fail? I'd really appreciate it if anyone can shed any light on this.

The difference is that the curl request has the User-Agent header set. The server you're talking to seems to require it to be set. You can verify it by:

% curl -k "" -H 'User-Agent:'
<head><title>400 Bad Request</title></head>
<center><h1>400 Bad Request</h1></center>

Your libcurl request should succeed once you add that header there.



Received on 2021-10-20