bugGNU Wget - Bugs: bug #44628, Wget does not honor RFC 6266 when...

 
 

bug #44628: Wget does not honor RFC 6266 when handling --content-disposition

Submitted by:  None
Submitted on:  Wed 25 Mar 2015 02:09:19 PM UTC  
 
Category: Program LogicSeverity: 3 - Normal
Priority: 5 - NormalStatus: Fixed
Privacy: PublicAssigned to: None
Originator Name: Yen Chi HsuanOriginator Email: -unavailable-
Open/Closed: ClosedRelease: None
Operating System: GNU/LinuxReproducibility: Every Time
Fixed Release: NonePlanned Release: None
Regression: NoneWork Required: None
Patch Included: None

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Sat 15 Aug 2015 07:45:45 AM UTC, comment #3:

Fixed in commit d03b40e31e9aa06669c3ae0113ed24273e1b60e5

Darshit Shah <darnir>
Project Administrator
Wed 25 Mar 2015 02:24:03 PM UTC, comment #2:

Sorry that I didn't notice that asterisks are parsed as boldface texts. Field names are "filename=" and "filename*=" respectively.

Anonymous
Wed 25 Mar 2015 02:23:48 PM UTC, comment #1:

Sorry that I didn't notice that asterisks are parsed as boldface texts. Field names are "filename=" and "filename*=" respectively.

Anonymous
Wed 25 Mar 2015 02:09:19 PM UTC, original submission:

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

Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by darnir (Posted a comment)
  • -unavailable- added by None (Submitted the item)
  •  

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 2 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Sat 15 Aug 2015 07:45:45 AM UTCdarnirStatusNone=>Fixed
      Open/ClosedOpen=>Closed

    Back to the top


    Powered by Savane 3.1-cleanup1