Skip to content

curl --head file:// no longer reports the headers #3083

@sjackman

Description

@sjackman

With curl 7.43.0, curl --head file://… outputs headers.
With curl 7.61.1, curl --head file://… outputs the contents of the file.

I did this

curl --head file:///usr/share/dict/words

I expected the following

Content-Length: 2493109
Accept-ranges: bytes
Last-Modified: Wed, 16 Sep 2015 03:00:17 GMT

I saw the following

a
aa
aal
aalii
aam
…

curl/libcurl version

curl 7.61.1 (x86_64-apple-darwin15.6.0) libcurl/7.61.1 SecureTransport zlib/1.2.5
Release-Date: 2018-09-05
Protocols: dict file ftp ftps gopher http https imap imaps ldap ldaps pop3 pop3s rtsp smb smbs smtp smtps telnet tftp 
Features: AsynchDNS IPv6 Largefile NTLM NTLM_WB SSL libz UnixSockets 

operating system

macOS 10.11.6 El Capitan

❯❯❯ /usr/bin/curl --head file:///usr/share/dict/words
Content-Length: 2493109
Accept-ranges: bytes
Last-Modified: Wed, 16 Sep 2015 03:00:17 GMT
❯❯❯ curl 7.43.0 (x86_64-apple-darwin15.0.0) libcurl/7.43.0 SecureTransport zlib/1.2.5
Protocols: dict file ftp ftps gopher http https imap imaps ldap ldaps pop3 pop3s rtsp smb smbs smtp smtps telnet tftp 
Features: AsynchDNS IPv6 Largefile GSS-API Kerberos SPNEGO NTLM NTLM_WB SSL libz UnixSockets

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions