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.

Check remote file exist with libcurl

From: Sztrepka Pál via curl-users <>
Date: Sun, 17 Jan 2021 10:20:00 +0100

I want to write a function that checks to see if a remote file (prot.
http) exists.
( Do not download the file content, only check! )
I have tried several curl options but so far have failed.
(only header option, max file size option, range option... not work)

For example:
   curl -IH

The problem: For a large file, this unfortunately takes a long time to
get the result back.
But, i don't understand why.

Sztrepka Pál
Received on 2021-01-17