curl / Mailing Lists / curl-users / Single Mail
Buy commercial curl support. 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 Daniel himself.

file: scheme pedantry

From: Paul Gilmartin via curl-users <curl-users_at_lists.haxx.se>
Date: Sun, 27 Jul 2025 19:23:35 -0600

For a file://path URL, must the path be absolute?
Experiment seems to show it's required, but the
mN page says only:
        FILE Read or write local files. curl does not support accessing
               file:// URL remotely, but when running on Microsoft Windows
               using the native UNC approach works.

Should this emphasize "absolute"?

And RFC 8089:
    o The minimal representation of a local file with no authority field
       and an absolute path that begins with a slash "/". For example:
       * "file:/path/to/file"

(That example should be more concrete, such as either:
     "file://etc/services"
or: "file:///etc/services"
curl accepts only the latter.)

Firefox accepts HREF relative to the referencing page.

If the referenced file has extended attributes, should
those be replicated in the downloaded file?
I see that curl replicates the Last-Modified:

-- 
Thanks,
gil
-- 
Unsubscribe: https://lists.haxx.se/mailman/listinfo/curl-users
Etiquette:   https://curl.se/mail/etiquette.html
Received on 2025-07-28