Question on wget upload/dload usage

2007-06-18 Thread Joe Kopra
I believe I may be using wget incorrectly. I am trying to upload .mup files to 
the IBM site:
   
  http://www14.software.ibm.com/webapp/set2/mds/mds
   
  The purpose of this exercise is to send the invscout output (the .mup) to IBM 
and get back a .html file that is a formatted report of what microcode update 
reccomendations they are making based on it.
   
  The docs for this are found here:
   
  http://www14.software.ibm.com/webapp/set2/mds/fetch?page=invreadme.html
   
  I am appending the header to the file as stated in 'about programmatic 
upload'
   
  http://www14.software.ibm.com/webapp/set2/mds/fetch?page=mds.html 
   
  But the error I get is:
   
  expecting upload file 
   
  The manual upload (without the header) works fine:
   
  http://www14.software.ibm.com/webapp/set2/mds/fetch?page=mdsUpload.html
   
  The wget statement looks like:
   
  wget --post-file=serverdata.mup -o postlog -O survey.html 
http://www14.software.ibm.com/webapp/set2/mds/mds
   
   
  Where serverdata.mup is the upload, and survey.html is the down... and again 
the html I get back always has the "expecting upload file " return, with or 
without the header info (prepended): 
   
  I am misusing wget or is this a problem with the IBM website parser?
   
  Please CC [EMAIL PROTECTED] for all replies.
   
  Thanks,
   
  Joe
   

 
-
Food fight? Enjoy some healthy debate
in the Yahoo! Answers Food & Drink Q&A.

RE: Suppressing DNS lookups when using wget, forcing specific IP address

2007-06-18 Thread Tony Lewis
Try: wget http://ip.of.new.sitename --header="Host: sitename.com" --mirror

For example: wget http://66.233.187.99 --header="Host: google.com" --mirror

Tony
-Original Message-
From: Kelly Jones [mailto:[EMAIL PROTECTED] 
Sent: Sunday, June 17, 2007 6:10 PM
To: wget@sunsite.dk
Subject: Suppressing DNS lookups when using wget, forcing specific IP
address

I'm moving a site from one server to another, and want to use "wget
-m" combined w/ "diff -auwr" to help make sure the site looks the same
on both servers.

My problem: "wget -m sitename.com" always downloads the site at its
*current* IP address. Can I tell wget: "download sitename.com, but
pretend the IP address of sitename.com is ip.address.of.new.server
instead of ip.address.of.old.server. In other words, suppress the DNS
lookup for sitename.com and force it to use a given IP address.

I've considered kludges like using "old.sitename.com" vs
"new.sitename.com", editing "/etc/hosts", using a proxy server, etc,
but I'm wondering if there's a clean solution here?

-- 
We're just a Bunch Of Regular Guys, a collective group that's trying
to understand and assimilate technology. We feel that resistance to
new ideas and technology is unwise and ultimately futile.



RE: Question on wget upload/dload usage

2007-06-18 Thread Tony Lewis
Joe Kopra wrote:

 

> The wget statement looks like:

> 

> wget --post-file=serverdata.mup -o postlog -O survey.html

>   http://www14.software.ibm.com/webapp/set2/mds/mds

 

--post-file does not work the way you want it to; it expects a text file
that contains something like this:

a=1&b=2

 

and it sends that raw text to the server in a POST request using a
Content-Type of application/x-www-form-urlencoded. If you run it with -d,
you will see something like this:

 

POST /someurl HTTP/1.0

User-Agent: Wget/1.10

Accept: */*

Host: www.exelana.com

Connection: Keep-Alive

Content-Type: application/x-www-form-urlencoded

Content-Length: 7

 

---request end---

[writing POST file data ... done]

 

To post a file as an argument, you need a Content-Type of
multipart/form-data, which wget does not currently support.

 

Tony