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: Cristian Rodríguez via curl-library <>
Date: Wed, 20 Oct 2021 08:08:15 -0300

if you have any control of the webserver, fix it. the standards says
an user agent SHOULD be set, SHOULD meaning recommended, not MUST
meaning required.

On Wed, Oct 20, 2021 at 6:53 AM Patrick Schlangen via curl-library
<> wrote:
> 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:'
> <html>
> <head><title>400 Bad Request</title></head>
> <body>
> <center><h1>400 Bad Request</h1></center>
> <hr><center>openresty/</center>
> </body>
> </html>
> Your libcurl request should succeed once you add that header there.
> Best,
> Patrick
> --
> Unsubscribe:
> Etiquette:
Received on 2021-10-20