bugGNU Wget - Bugs: bug #29031, Why wget sends HEAD request when...

 
 

bug #29031: Why wget sends HEAD request when --content-disposition option enabled?

Submitted by:  None
Submitted on:  Mon 01 Mar 2010 09:00:19 AM UTC  
 
Category: Program LogicSeverity: 3 - Normal
Priority: 5 - NormalStatus: Fixed
Privacy: PublicAssigned to: Giuseppe Scrivano <gscrivano>
Originator Name: Originator Email: -unavailable-
Open/Closed: ClosedRelease: 1.11.4
Operating System: Microsoft WindowsReproducibility: Every Time
Fixed Release: NonePlanned Release: 1.12.x
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.

 

Thu 03 Jun 2010 02:47:38 PM UTC, comment #1:

thanks for your report!

Indeed, there is no need of an additional HEAD request when --content-disposition is specified.

I have committed a patch that fixes it (revision 2377).

Giuseppe Scrivano <gscrivano>
Project AdministratorIn charge of this item.
Mon 01 Mar 2010 09:00:19 AM UTC, original submission:

When wget downloads content without this option, it uses ordinary GET request. When --content-disposition option is enabled, it sends HEAD request, then sends GET request as usally to load requested content. I can see this with wget -d debug option enabled.

So the qestion: why sending HEAD? HTTP servers sends content-disposition header all the time, in the GET request too. So there is no reason to use HEAD at all.

Moreover, server-side logic that implements dynamic content download often do this by scripting engines (like php, perl, ASP, etc.), these scripts often don't checks that the HEAD request was made, so sends all the file content to output, but HTTP server filter output sends only headers. WGET often used to download huge file content as movies etc. So we can imagine how HTTP server truncates 1-2G script output -- it is very useless job.

So there is double overload: on the client and the server side.
Please, exclude HEAD request from wget logic when --content-disposition option enabled an do all the work with one GET request.

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 gscrivano (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 4 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Thu 03 Jun 2010 02:47:38 PM UTCgscrivanoStatusNone=>Fixed
      Assigned toNone=>gscrivano
      Open/ClosedOpen=>Closed
      Planned ReleaseNone=>1.12.x

    Back to the top


    Powered by Savane 3.1-cleanup1