Re: HTTP /1.1 500 Internal Server Error

2002-06-03 Thread Mark Bucciarelli

On Sunday 02 June 2002 09:38 am, Hack Kampbjørn wrote:
 Mark Bucciarelli wrote:
  I am having trouble wgetting a samsung printer driver from their site. 
  Every time I try, I immediately get an HTTP/1.1 500 Internal Server
  Error.   The web browser initiates the download properly when I click on
  the link from the referer page.
[snip]
 This seems to be yet another encoding problem. I have no problem if I
 change the 'amp;' to ''. IIRC URLs found in a HTML page should be HTML
 decoded. A simple test (wget -F -i URL.html) shows that wget does this.

Thanks, I was able to get this to work.

I think the man page should mention this coding/decoding stuff.  Not important 
enough for the description, but perhaps you could add the following paragraph 
under the -F option:

If the URL includes a character entity reference (that is, lt; gt; amp;
or quot;), the -F option will automatically decode these references.  If
you not using the -F option, then you should replace the references with
the characters themselves (that is, , , , or ).

Mark






HTTP /1.1 500 Internal Server Error

2002-06-02 Thread Mark Bucciarelli

I am having trouble wgetting a samsung printer driver from their site.  Every 
time I try, I immediately get an HTTP/1.1 500 Internal Server Error.   The 
web browser initiates the download properly when I click on the link from the 
referer page.

Here is the command I am running (I don't have a .wgetrc):

wget --debug 
--referer=http://www.samsungelectronics.com/printer/support/downloads/400329_844_file4.html;
 
http://211.45.27.253/servlet/Downloader?path=%2Fprinter%2Fsupport%2Fdownloads%2Fattach_file%2F20020516175051spp-1.0.2.i386.tar.gzamp;realname=spp-1.0.2.i386.tar.gz;

and here is the debug output:

DEBUG output created by Wget 1.8.1 on linux-gnu.

--08:21:58--  
http://211.45.27.253/servlet/Downloader?path=%2Fprinter%2Fsupport%2Fdownloads%2Fattach_file%2F20020516175051spp-1.0.2.i386.tar.gzamp;realname=spp-1.0.2.i386.tar.gz
   = 
`Downloader?path=%2Fprinter%2Fsupport%2Fdownloads%2Fattach_file%2F20020516175051spp-1.0.2.i386.tar.gzamp;realname=spp-1.0.2.i386.tar.gz'
Connecting to 211.45.27.253:80... connected.
Created socket 3.
Releasing 0x8071fe0 (new refcount 0).
Deleting unused 0x8071fe0.
---request begin---
GET 
/servlet/Downloader?path=%2Fprinter%2Fsupport%2Fdownloads%2Fattach_file%2F20020516175051spp-1.0.2.i386.tar.gzamp;realname=spp-1.0.2.i386.tar.gz
 
HTTP/1.0
User-Agent: Wget/1.8.1
Host: 211.45.27.253
Accept: */*
Connection: Keep-Alive
Referer: 
http://www.samsungelectronics.com/printer/support/downloads/400329_844_file4.html

---request end---
HTTP request sent, awaiting response... HTTP/1.1 500 Internal Server Error
Server: Microsoft-IIS/5.0
Date: Sun, 02 Jun 2002 12:07:47 GMT
Connection: keep-alive
Connection: Keep-alive
Content-Type: text/html
Content-Length: 1565


Registered fd 3 for persistent reuse.
Closing fd 3
Releasing 0x8072818 (new refcount 0).
Deleting unused 0x8072818.
Invalidating fd 3 from further reuse.
08:21:59 ERROR 500: Internal Server Error.

Thanks for a great tool!

Mark




Re: HTTP /1.1 500 Internal Server Error

2002-06-02 Thread Hack Kampbjørn

Mark Bucciarelli wrote:
 
 I am having trouble wgetting a samsung printer driver from their site.  Every
 time I try, I immediately get an HTTP/1.1 500 Internal Server Error.   The
 web browser initiates the download properly when I click on the link from the
 referer page.
 
 Here is the command I am running (I don't have a .wgetrc):
 
 wget --debug
 
--referer=http://www.samsungelectronics.com/printer/support/downloads/400329_844_file4.html;
 
http://211.45.27.253/servlet/Downloader?path=%2Fprinter%2Fsupport%2Fdownloads%2Fattach_file%2F20020516175051spp-1.0.2.i386.tar.gzamp;realname=spp-1.0.2.i386.tar.gz;
 
 and here is the debug output:
debug output skipped/

This seems to be yet another encoding problem. I have no problem if I
change the 'amp;' to ''. IIRC URLs found in a HTML page should be HTML
decoded. A simple test (wget -F -i URL.html) shows that wget does this.
But I'm not sure wget should do it for URLs on the cmd line or in a
non-HTML file. In the past we had a lot of problems with wget being
overzealously {en|de}coding URLs.

$ wget
http://211.45.27.253/servlet/Downloader?path=%2Fprinter%2Fsupport%2Fdownloads%2Fattach_file%2F20020516175051spp-1.0.2.i386.tar.gzrealname=spp-1.0.2.i386.tar.gz;
--15:20:35-- 
http://211.45.27.253/servlet/Downloader?path=%2Fprinter%2Fsupport%2Fdownloads%2Fattach_file%2F20020516175051spp-1.0.2.i386.tar.gzrealname=spp-1.0.2.i386.tar.gz
   =
`Downloader@path=%2Fprinter%2Fsupport%2Fdownloads%2Fattach_file%2F20020516175051spp-1.0.2.i386.tar.gzrealname=spp-1.0.2.i386.tar.gz'
Connecting to 211.45.27.253:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 28,864,218 [application/octet-stream]
Last-modified header missing -- time-stamps turned off.
--15:20:36-- 
http://211.45.27.253/servlet/Downloader?path=%2Fprinter%2Fsupport%2Fdownloads%2Fattach_file%2F20020516175051spp-1.0.2.i386.tar.gzrealname=spp-1.0.2.i386.tar.gz
   =
`Downloader@path=%2Fprinter%2Fsupport%2Fdownloads%2Fattach_file%2F20020516175051spp-1.0.2.i386.tar.gzrealname=spp-1.0.2.i386.tar.gz'
Connecting to 211.45.27.253:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [application/octet-stream]

[ = ] 1,257,472 25.53K/s

 Thanks for a great tool!

And thank you for reading the instructions and actually including debug
output !

 
 Mark

-- 
Med venlig hilsen / Kind regards

Hack Kampbjørn



Re: HTTP /1.1 500 Internal Server Error

2002-06-02 Thread Hrvoje Niksic

Hack Kampbjørn [EMAIL PROTECTED] writes:

 But I'm not sure wget should do [HTML de-quoting] for URLs on the
 cmd line or in a non-HTML file.

I'm pretty sure that it shouldn't.  HTML unquoting only makes sense in
the context of HTML.  That's how the browsers behave, as well --
typing amp; in the location field will not cause it to be dequoted.