[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug-wget] [bug #44628] Wget does not honor RFC 6266 when handling --con
From: |
anonymous |
Subject: |
[Bug-wget] [bug #44628] Wget does not honor RFC 6266 when handling --content-disposition |
Date: |
Wed, 25 Mar 2015 14:09:21 +0000 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:36.0) Gecko/20100101 Firefox/36.0 |
URL:
<http://savannah.gnu.org/bugs/?44628>
Summary: Wget does not honor RFC 6266 when handling
--content-disposition
Project: GNU Wget
Submitted by: None
Submitted on: Wed 25 Mar 2015 02:09:19 PM UTC
Category: Program Logic
Severity: 3 - Normal
Priority: 5 - Normal
Status: None
Privacy: Public
Assigned to: None
Originator Name: Yen Chi Hsuan
Originator Email: address@hidden
Open/Closed: Open
Discussion Lock: Any
Release: None
Operating System: GNU/Linux
Reproducibility: Every Time
Fixed Release: None
Planned Release: None
Regression: None
Work Required: None
Patch Included: None
_______________________________________________________
Details:
In parse_content_disposition() of src/http.c, filenames in header
Content-Disposition is concatenated to form the final name. For an example,
see the following download log:
https://gist.githubusercontent.com/yan12125/9c7d0298203995b16235/raw/4e266523861d2c3f0f4df2d76bd7d31f1703d35c/gistfile1.txt
The Google Drive server provides both "filename=" and "filename*=" headers.
However, according to a suggestion listed in section 4.3 of RFC 6266 [1], only
the value specified by "filename*=" should be used. Here I paste the relevant
paragraph:
Many user agent implementations predating this specification do not understand
the "filename*" parameter. Therefore, when both "filename" and "filename*"
are present in a single header field value, recipients SHOULD pick "filename*"
and ignore "filename". This way, senders can avoid special-casing specific
user agents by sending both the more expressive "filename*" parameter, and the
"filename" parameter as fallback for legacy recipients (see Section 5 for an
example).
As a result, the final filename should be testfile.txt in the above case.
I'm using Arch Linux, and my wget is built from the AUR package wget-git [2].
[1] https://tools.ietf.org/html/rfc6266#section-4.3
[2] https://aur.archlinux.org/packages/wget-git
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?44628>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
- [Bug-wget] [bug #44628] Wget does not honor RFC 6266 when handling --content-disposition,
anonymous <=