bugGNU Wget - Bugs: bug #21392, --post-data should only POST to...

 
 

bug #21392: --post-data should only POST to the first URI, not recursive downloads

Submitted by:  Micah Cowan <micahcowan>
Submitted on:  Mon 22 Oct 2007 06:42:40 PM UTC  
 
Category: Program LogicSeverity: 2 - Minor
Priority: 3 - LowStatus: None
Privacy: PublicAssigned to: None
Originator Name: Open/Closed: Open
Release: NoneOperating System: None
Reproducibility: NoneFixed Release: None
Planned Release: 1.14Regression: None
Work Required: 0 - HoursPatch Included: None

Add a New Comment(Rich Markup)
   

You are not logged in

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

 

Thu 22 Apr 2010 07:05:43 PM UTC, comment #1:

Stuart and others - here's a dirty hack that's working for what I need...

/usr/bin/wget --post-data "Username=$USERNAME&Password=$PASSWORD" -O - "$SOURCE" | /usr/bin/wget --base="$SOURCEBASE" --force-html -r -l 2 -nd -nH -i -

Anonymous
Mon 22 Oct 2007 06:42:40 PM UTC, original submission:

(From the mailing list:)

Hi

I've been using wget to recursively download the output of a CGI
script on a server, together with any documents linked to by the
output of that CGI script - and then to use -k to create a locally
linked version.

Due to the length of data sent to the CGI script, wget needs to be
invoked with --post-file

It seems that wget sends this post data to all the URLs it recursively
downloads - not just the base URL. Unfortunately this stings me
somewhat, as one of the webservers I need to download the linked files
from refuses post requests. (Even if I can get this changed, it seems
wrong to be sending post requests designed for one page to another
one)

Is there any way to get wget to only use the post data for the first
file downloaded? I couldn't find any in the documentation - in fact
there seems to be nothing in the documentation regarding the
interaction of recursive downloading with post data. It would be great
to see the current behaviour documented somewhere.

Alternatively, if anyone can suggest any workarounds, that'd be much
appreciated. I need to convert the links, so just downloading the
first file using post, and then using that as wget's input (using -i)
won't work.

Stuart Moore

Micah Cowan <micahcowan>

 

(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 micahcowan (Submitted the item)
  •  

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

     

     

    Follow 3 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Thu 21 Aug 2008 11:56:01 PM UTCmicahcowanPlanned Release1.15=>1.14
    Sun 27 Jan 2008 04:34:29 AM UTCmicahcowanPlanned Release1.12=>1.15
    Mon 22 Oct 2007 06:43:16 PM UTCmicahcowanPriority5 - Normal=>3 - Low

    Back to the top


    Powered by Savane 3.1-cleanup1