You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Trying to figure out how to support file:// urls #611
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.
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.
Activity
guemax commentedon Aug 11, 2026
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 tohandle.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!