Skip to content

Trying to figure out how to support file:// urls #611

Closed

Description

@erikh

CURL_DISABLE_FILE is not set in curl-sys and even with static builds on in features, I can't use file:// urls. I'm not really that familiar with the curl build system so I'm wondering if anyone knows how I can get this functionality? I need it for flexibility within a project.

Activity

  1. guemax commented on Aug 11, 2026

    @guemax

    [...] I can't use file:// urls.

    Late to the party, but what do you mean by that? I am using curl-rust with file:// urls and encountered a small issue: assert_eq!(handle.response_code()?, 200); always failed, because I got 0 instead of the expected 200 like I did with https:// urls. Note that the previous call to handle.perform()?; did not fail.)

    Turns out, the response code is meaningless for file:// urls, see https://curl.se/libcurl/c/CURLINFO_RESPONSE_CODE.html. The call to libcurl was actually successful and I got the requested file, I just had to remove the check for response code.

    Was this also your issue? Hope this helps!

  2. Repository owner locked and limited conversation to collaborators on Oct 5, 2026
  3. converted this issue into a discussion #679 on Oct 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions