This service will be undergoing maintenance at 00:00 UTC, 2017-10-23 It is expected to last about 30 minutes
Bug 239351 - wget ignores filename in Content-Disposition header when saving files
wget ignores filename in Content-Disposition header when saving files
Product: Fedora
Classification: Fedora
Component: wget (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Karsten Hopp
Depends On:
  Show dependency treegraph
Reported: 2007-05-07 15:28 EDT by Daniel Berrange
Modified: 2008-05-14 10:57 EDT (History)
3 users (show)

See Also:
Fixed In Version: wget-1.11
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2008-05-14 10:57:30 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Daniel Berrange 2007-05-07 15:28:52 EDT
Description of problem:
Running a download like


Now results in a horrifically named file like


This is despite the server provided the sensible filename in the
Content-disposition header:

wget -S
Connecting to||:80... connected.
HTTP request sent, awaiting response... 
  HTTP/1.1 200 OK
  Date: Mon, 07 May 2007 19:24:58 GMT
  Server: Apache/2.2.3 (Fedora)
  Content-Disposition: attachment;
  Connection: close
  Content-Type: application/x-rpm

In fact the above output shows wget decides on the output filename before it has
even contacted the server.

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1.  wget -S
Actual results:
File called

Expected results:
File called kernel-xen-2.6.20-2925.6.fc7testbuild4.x86_64.rpm

Additional info:
This is a regression from Fedora Core 6  wget-1.10.2-8.fc6.1, where it waited
until it had read the HTTP headers before deciding the output filename:

Connecting to||:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [application/x-rpm]
Saving to: `kernel-xen-2.6.20-2925.6.fc7testbuild4.x86_64.rpm'
Comment 1 Ignacio Vazquez-Abrams 2007-05-12 12:57:18 EDT
None of the patches in wget-1.10.2-15.fc7 seem to cause the problem.
Comment 2 Bug Zapper 2008-04-03 20:35:01 EDT
Based on the date this bug was created, it appears to have been reported
against rawhide during the development of a Fedora release that is no
longer maintained. In order to refocus our efforts as a project we are
flagging all of the open bugs for releases which are no longer
maintained. If this bug remains in NEEDINFO thirty (30) days from now,
we will automatically close it.

If you can reproduce this bug in a maintained Fedora version (7, 8, or
rawhide), please change this bug to the respective version and change
the status to ASSIGNED. (If you're unable to change the bug's version
or status, add a comment to the bug and someone will change it for you.)

Thanks for your help, and we apologize again that we haven't handled
these issues to this point.

The process we're following is outlined here:

We will be following the process here: to ensure this
doesn't happen again.
Comment 3 Micah Cowan 2008-05-13 16:18:00 EDT
The version of Wget against which this bug has been reported did not have
support for the Content-Disposition header (which is not a real HTTP header).
Wget 1.11 and later have added support for this, but because there are remaining
issues with this support, it must be explicitly enabled, via
--content-disposition, or "content-disposition=on" in ~/.wgetrc.

Perhaps this can be closed now?
Comment 4 Karsten Hopp 2008-05-14 10:57:30 EDT
yes, I'll close it

Note You need to log in before you can comment on or make changes to this bug.