Description
I did this
In MS Windows Command Prompt:
curl.exe -D Header1 -I -o Header2 -w %{JSON} https://curl.se/windows/dl-7.78.0_6/curl-7.78.0_6-win64-mingw.zip
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 5719k 0 0 0 0 0 0 --:--:-- 0:00:02 --:--:-- 0
{"content_type":"application/zip","errormsg":null,"exitcode":0,"filename_effective":"Header2","ftp_entry_path":null,"http_code":200,"http_connect":0,"http_version":"2","local_ip":"10.22.0.61","local_port":9526,"method":"HEAD","num_connects":1,"num_headers":19,"num_redirects":0,"proxy_ssl_verify_result":0,"redirect_url":null,"referer":null,"remote_ip":"151.101.194.49","remote_port":443,"response_code":200,"scheme":"HTTPS","size_download":0,"size_header":769,"size_request":119,"size_upload":0,"speed_download":0,"speed_upload":0,"ssl_verify_result":0,"time_appconnect":2.281595,"time_connect":0.278050,"time_namelookup":0.070712,"time_pretransfer":2.282247,"time_redirect":0.000000,"time_starttransfer":2.616433,"time_total":2.620566,"url":"https://curl.se/windows/dl-7.78.0_6/curl-7.78.0_6-win64-mingw.zip","url_effective":"https://curl.se/windows/dl-7.78.0_6/curl-7.78.0_6-win64-mingw.zip","urlnum":0,"curl_version":"libcurl/7.78.0 OpenSSL/3.0.0 (Schannel) zlib/1.2.11 brotli/1.0.9 zstd/1.5.0 libidn2/2.3.2 libssh2/1.10.0 nghttp2/1.44.0 libgsasl/1.10.0"}
«"size_download":0»? Really? Look in the folder:
Dir Header*
Том в устройстве E имеет метку …
Серийный номер тома: …-…
Содержимое папки …:\…\cURL\curl-7.78.0_6-win64-mingw\bin
11.09.2021 07:50 769 Header1
11.09.2021 07:50 769 Header2
2 файлов 1 538 байт
0 папок … байт свободно
FC /B Header1 Header2
Сравнение файлов Header1 и HEADER2
FC: различия не найдены
Type Header2
HTTP/2 200
server: nginx/1.17.6
content-type: application/zip
x-frame-options: SAMEORIGIN
last-modified: Wed, 21 Jul 2021 04:46:56 GMT
etag: "595c91-5c79adc273000"
cache-control: max-age=31536000
expires: Fri, 09 Sep 2022 03:27:52 GMT
x-content-type-options: nosniff
content-security-policy: default-src 'self' curl.haxx.se www.curl.se curl.se www.fastly-insights.com fastly-insights.com; style-src 'unsafe-inline' 'self' curl.haxx.se www.curl.se curl.se
strict-transport-security: max-age=31536000
via: 1.1 varnish, 1.1 varnish
accept-ranges: bytes
age: 177768
date: Sat, 11 Sep 2021 04:50:40 GMT
x-served-by: cache-bma1641-BMA, cache-pdk17851-PDK
x-cache: HIT, HIT
x-cache-hits: 0, 0
x-timer: S1631335840.122262,VS0,VE1
content-length: 5856401
I expected the following
"size_download":769
Or fix the BUG №7691 («Header and JSON-report are combined.»).
curl/libcurl version
Build: 7.78.0_6
[curl -V output]
curl 7.78.0 (x86_64-pc-win32) libcurl/7.78.0 OpenSSL/3.0.0 (Schannel) zlib/1.2.11 brotli/1.0.9 zstd/1.5.0 libidn2/2.3.2 libssh2/1.10.0 nghttp2/1.44.0 libgsasl/1.10.0
Release-Date: 2021-07-21
Protocols: dict file ftp ftps gopher gophers http https imap imaps ldap ldaps mqtt pop3 pop3s rtsp scp sftp smb smbs smtp smtps telnet tftp
Features: alt-svc AsynchDNS brotli gsasl HSTS HTTP2 HTTPS-proxy IDN IPv6 Kerberos Largefile libz MultiSSL NTLM SPNEGO SSL SSPI TLS-SRP UnixSockets zstd
operating system
MS Windows 10-21H1