bugGNU Wget - Bugs: bug #39175, Header value length limited with...

 
 

bug #39175: Header value length limited with 256

Submitted by:  Anton <antonscherbakov>
Submitted on:  Thu 06 Jun 2013 06:27:39 AM UTC  
 
Category: Protocol IssueSeverity: 3 - Normal
Priority: 5 - NormalStatus: In Progress
Privacy: PublicAssigned to: None
Originator Name: Header value lengthOpen/Closed: Open
Release: 1.13.4Operating System: GNU/Linux
Reproducibility: Every TimeFixed Release: None
Planned Release: NoneRegression: None
Work Required: NonePatch Included: None

Add a New Comment (Rich MarkupRich Markup):
   

You are not logged in

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

 

Sat 02 Nov 2013 10:54:05 AM UTC, comment #1:

despite that it is not the correct fix, I have increased the limit to 512 for now. It should make more difficult for this error to happen.

Giuseppe Scrivano <gscrivano>
Project Administrator
Thu 06 Jun 2013 06:27:39 AM UTC, original submission:

I foun out that command line like this:
wget -N --debug --content-disposition --restrict-file-names=nocontrol http://data.mos.ru/datasets/download/499

saves file with "bad" file name - "499" dispite of there is Content-Disposition filename in HTTP header. The reason is that filename is rather long and there is limit size for header value - it is hard coded in http.c:1547

---
char hdrval[256];
---

Situation may be reproduced by including in responce header linelike this:

---
Content-Disposition: attachment; filename="aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
---

All value in this case (starting with "attachment") is 280 bytes long.

I didn't find standard limit for values in header, but as I understood there is limit for all header (8-48Kb).

Anton <antonscherbakov>

 

(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 gscrivano (Posted a comment)
  • -unavailable- added by antonscherbakov (Submitted the item)
  •  

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

     

     

    Follows 1 latest change.

    Date Changed By Updated Field Previous Value => Replaced By
    Sat 02 Nov 2013 10:54:05 AM UTCgscrivanoStatusNone=>In Progress

    Back to the top


    Powered by Savane 3.1-cleanup