Package: wget
Version: 1.21.3-1+b2
Severity: normal
Tags: upstream
X-Debbugs-Cc: debbug.w...@sideload.33mail.com

Apparently when a URL refers to a directory that redirects to a file,
wget gives up instantly without checking the redirect header. This is
a sample broken session:

===8<------------------------------
$ wget 
'https://consumer.georgia.gov/document/document/consumer-complaint-form-english/download'
--[timestamp]--  
https://consumer.georgia.gov/document/document/consumer-complaint-form-english/download
Resolving consumer.georgia.gov (consumer.georgia.gov)... 104.18.74.48
Connecting to consumer.georgia.gov (consumer.georgia.gov)|104.18.74.48|:443... 
connected.
HTTP request sent, awaiting response... 200 OK
Length: 183944 (180K) [application/pdf]
download: Is a directory
===8<------------------------------

** workaround **

The workaround is basically to use anything other than wget. Firefox
works but FF suggests the wrong filename. Aria2c works flawlessly and
sets the correct filename. This is what the aria2c session looks like:

===8<------------------------------
$ aria2c 
'https://consumer.georgia.gov/document/document/consumer-complaint-form-english/download'
[timestamp] [NOTICE] Downloading 1 item(s)
[#6234b1 0B/0B CN:1 DL:0B]
[timestamp] [NOTICE] Download complete: $PWD/Consumer Complaint Form - 
2024-09-30.pdf

Download Results:
gid   |stat|avg speed  |path/URI
======+====+===========+=======================================================
6234b1|OK  |   459KiB/s|$PWD/Consumer Complaint Form - 2024-09-30.pdf

Status Legend:
(OK):download completed.
===8<------------------------------


-- System Information:
Debian Release: 12.7
  APT prefers stable-updates
  APT policy: (990, 'stable-updates'), (990, 'stable-security'), (990, 
'stable'), (500, 'oldstable')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 5.10.0-28-amd64 (SMP w/2 CPU threads)
Kernel taint flags: TAINT_OOT_MODULE, TAINT_UNSIGNED_MODULE
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages wget depends on:
ii  libc6         2.36-9+deb12u8
ii  libgnutls30   3.7.9-2+deb12u3
ii  libidn2-0     2.3.3-1+b1
ii  libnettle8    3.8.1-2
ii  libpcre2-8-0  10.42-1
ii  libpsl5       0.21.2-1
ii  libuuid1      2.38.1-5+deb12u1
ii  zlib1g        1:1.2.13.dfsg-1

Versions of packages wget recommends:
ii  ca-certificates  20230311

wget suggests no packages.

-- no debconf information

Reply via email to