rockdaboot / wget2

The successor of GNU Wget. Contributions preferred at https://gitlab.com/gnuwget/wget2. But accepted here as well 😍
GNU Lesser General Public License v3.0
574 stars 77 forks source link

wget 2.1.0 doesn't work with -S or --save-headers #359

Open pmansfilmn opened 4 hours ago

pmansfilmn commented 4 hours ago

This is on Fedora 41, x86-64.Maybe it's just the Fedora package?

the -S option appears to do nothing, nor if I use --server-response. it does save stats files

# /usr/bin/wget -O /dev/null -S https://www.google.com
/dev/null            100% [=======================================================================================================================================================================================>]    8.18K    --.-KB/s
                          [Files: 1  Bytes: 8.18K [41.55KB/s] Redirects: 0  Todo: 0  Errors: 0                                      

# /usr/bin/wget -O /dev/null --stats-tls stats-tls.out --stats-server stats-server.out --server-response --save-headers https://www.google.com
/dev/null            100% [=======================================================================================================================================================================================>]    8.17K    --.-KB/s
                          [Files: 1  Bytes: 9.42K [47.60KB/s] Redirects: 0  Todo: 0  Errors: 0                                                                                                                     ]
# 

# /usr/bin/wget -O /dev/null --stats-tls stats-tls.out --stats-server stats-server.out --server-response -S https://www.google.com
/dev/null            100% [=======================================================================================================================================================================================>]    8.16K    --.-KB/s
                          [Files: 1  Bytes: 8.16K [35.82KB/s] Redirects: 0  Todo: 0  Errors: 0    
#

# ls -latr | tail -2
-rw-r--r--.  1 root       root         247 Nov 25 12:53 stats-tls.out
-rw-r--r--.  1 root       root         185 Nov 25 12:53 stats-server.out
# more stats*
::::::::::::::
stats-server.out
::::::::::::::
  www.google.com:
    IP             : 142.250.178.4
    Scheme         : https
    HPKP           : HPKP_NO
    HPKP New Entry : Off
    HSTS           : Off
    CSP            : Off

::::::::::::::
stats-tls.out
::::::::::::::
  www.google.com:
    Version         : TLS1.3
    False Start     : Off
    TFO             : On
    ALPN Protocol   : h2
    Resumed         : No
    TCP Protocol    : HTTP/2
    Cert Chain Size : 3
    TLS negotiation
    duration (ms)   : 75

# rpm -qi wget2
Name        : wget2
Version     : 2.1.0
Release     : 12.fc41
Architecture: x86_64
Install Date: Thu 24 Oct 2024 14:50:53 UTC
Group       : Unspecified
Size        : 905273
License     : GPL-3.0-or-later AND LGPL-3.0-or-later AND GFDL-1.3-or-later
Signature   : RSA/SHA256, Sun 21 Jul 2024 23:44:11 UTC, Key ID d0622462e99d6ad1
Source RPM  : wget2-2.1.0-12.fc41.src.rpm
Build Date  : Sun 21 Jul 2024 06:16:36 UTC
Build Host  : buildvm-x86-27.iad2.fedoraproject.org
Packager    : Fedora Project
Vendor      : Fedora Project
URL         : https://gitlab.com/gnuwget/wget2
Bug URL     : https://bugz.fedoraproject.org/wget2
Summary     : An advanced file and recursive website downloader
Description :
GNU Wget2 is the successor of GNU Wget, a file and recursive website
downloader.

Designed and written from scratch it wraps around libwget, that provides the
basic functions needed by a web client.

Wget2 works multi-threaded and uses many features to allow fast operation.
In many cases Wget2 downloads much faster than Wget1.x due to HTTP2, HTTP
compression, parallel connections and use of If-Modified-Since HTTP header.
pmansfilmn commented 4 hours ago

of course, the work-round is to use curl

# curl -o /dev/null -sS -D - https://www.google.com
HTTP/2 200 
date: Mon, 25 Nov 2024 12:58:44 GMT
expires: -1
cache-control: private, max-age=0
content-type: text/html; charset=ISO-8859-1
content-security-policy-report-only: object-src 'none';base-uri 'self';script-src 'nonce-MR0F8hXBEjwAS_2LCq7slg' 'strict-dynamic' 'report-sample' 'unsafe-eval' 'unsafe-inline' https: http:;report-uri https://csp.withgoogle.com/csp/gws/other-hp
accept-ch: Sec-CH-Prefers-Color-Scheme
p3p: CP="This is not a P3P policy! See g.co/p3phelp for more info."
server: gws
x-xss-protection: 0
x-frame-options: SAMEORIGIN
set-cookie: AEC=AZ6Zc-XvmVGXRyKb-FAhfUTBzpJyjf28dSXMdvd0sEGWkk1t5f7eMqLQVDU; expires=Sat, 24-May-2025 12:58:44 GMT; path=/; domain=.google.com; Secure; HttpOnly; SameSite=lax
set-cookie: __Secure-ENID=24.SE=LixHVn0Jt9KI-0reUCX5VM02WlEv85ZVVA3H6NAsxDXDrtZWNyuLoS7ryE8CRymS2DU7hPV_G1iGqjAeq4J_UzlyxqUATzbEgrxhbadwkddgnJvymDYoVEpzJwP7iRfyuysDSisy_vS83sSV2ybXNFel7dcYCuRhK1O_pJUZ5N0185DpEOLrRffrXVzvBA3ntrpHoa92Qng; expires=Fri, 26-Dec-2025 05:17:02 GMT; path=/; domain=.google.com; Secure; HttpOnly; SameSite=lax
alt-svc: h3=":443"; ma=2592000,h3-29=":443"; ma=2592000
accept-ranges: none
vary: Accept-Encoding