Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CURLOPT_WILDCARDMATCH with CURLOPT_CHUNK_BGN_FUNCTION: curl_fileinfo->time == 0 #3829

Closed
JCMais opened this issue May 2, 2019 · 2 comments

Comments

@JCMais
Copy link

commented May 2, 2019

I did this

Used libcurl with CURLOPT_WILDCARDMATCH set to true and set a CURLOPT_CHUNK_BGN_FUNCTION callback.

The curl_fileinfo argument received has time member set to 0

I expected the following

curl_fileinfo time to be set to the unix timestamp of the file.

This can be tested with this url: ftp://ftp.rz.uni-wuerzburg.de/*

curl/libcurl version

curl 7.64.1 (x86_64-pc-linux-gnu) libcurl/7.64.1 OpenSSL/1.1.0i zlib/1.2.11 libidn2/2.1.1 libssh2/1.8.2 nghttp2/1.32.0
Release-Date: 2019-03-27
Protocols: dict file ftp ftps gopher http https imap imaps ldap ldaps pop3 pop3s rtsp scp sftp smb smbs smtp smtps telnet tftp
Features: AsynchDNS GSS-API HTTP2 HTTPS-proxy IDN IPv6 Kerberos Largefile libz NTLM NTLM_WB SPNEGO SSL TLS-SRP UnixSockets

operating system

Linux (Ubuntu)

@bagder bagder added the FTP label May 2, 2019
@bagder

This comment has been minimized.

Copy link
Member

commented May 2, 2019

Acknowledged! But this functionality unfortunately never worked as it was never actually implemented. The empty date parsing function that was provided in the initial implementation from May 2010 (commit 0825cd8) was removed in 2015 in commit 86e2197.

I personally don't have any strong desire to implement this now and would probably prefer to document this struct field as always set to zero, which is the truth.

@JCMais

This comment has been minimized.

Copy link
Author

commented May 2, 2019

@bagder thanks for answering, makes sense for me. Library users can still parse the date string available on strings.time themselves.

bagder added a commit that referenced this issue May 3, 2019
The time field in the curl_fileinfo struct will always be zero. No code
was ever implemented to actually convert the date string to a time_t.

Fixes #3829
@bagder bagder closed this in 28f38da May 3, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Aug 1, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
2 participants
You can’t perform that action at this time.