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






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.



Re: HTTP 1.1

2002-04-15 Thread csaba . raduly


On 12/04/2002 21:37:31 hniksic wrote:

Tony Lewis [EMAIL PROTECTED] writes:

 Hrvoje Niksic wrote:

  Is there any way to make Wget use HTTP/1.1 ?

 Unfortunately, no.

 In looking at the debug output, it appears to me that wget is really
 sending HTTP/1.1 headers, but claiming that they are HTTP/1.0
 headers. For example, the Host header was not defined in RFC 1945,
 but wget is sending it.

Yes.  That is by design -- HTTP was meant to be extended in that way.
Wget is also requesting and accepting `Keep-Alive', using `Range', and
so on.

Csaba Raduly's patch would break Wget because it doesn't suppose the
chunked transfer-encoding.  Also, its understanding of persistent
connection might not be compliant with HTTP/1.1.

IT WAS A JOKE !
Serves me right. I need to put bigger smilies :-(


--
Csaba Ráduly, Software Engineer   Sophos Anti-Virus
email: [EMAIL PROTECTED]http://www.sophos.com
US Support: +1 888 SOPHOS 9 UK Support: +44 1235 559933




RE: HTTP 1.1

2002-04-12 Thread Boaz Yahav

So basically I only need to make this change and recompile?
I wish this was a switch :)

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Friday, April 12, 2002 12:58 PM
Cc: Boaz Yahav; [EMAIL PROTECTED]
Subject: Re: HTTP 1.1



On 11/04/2002 18:26:15 hniksic wrote:

Boaz Yahav [EMAIL PROTECTED] writes:

 Is there any way to make Wget use HTTP/1.1 ?

Unfortunately, no.

Sure it can be made to use HTTP 1.1

--- http.c.orig   Wed Jan 30 14:10:42 2002
+++ http.c  Fri Apr 12 11:56:22 2002
@@ -838,7 +838,7 @@
  + 64);
   /* Construct the request.  */
   sprintf (request, \
-%s %s HTTP/1.0\r\n\
+%s %s HTTP/1.1\r\n\
 User-Agent: %s\r\n\
 Host: %s%s%s%s\r\n\
 Accept: %s\r\n\




:-)

--
Csaba Ráduly, Software Engineer   Sophos
Anti-Virus
email: [EMAIL PROTECTED]
http://www.sophos.com
US Support: +1 888 SOPHOS 9 UK Support: +44 1235
559933




Re: HTTP 1.1

2002-04-12 Thread Tony Lewis

Hrvoje Niksic wrote:

  Is there any way to make Wget use HTTP/1.1 ?

 Unfortunately, no.

In looking at the debug output, it appears to me that wget is really sending
HTTP/1.1 headers, but claiming that they are HTTP/1.0 headers. For example,
the Host header was not defined in RFC 1945, but wget is sending it.

Tony




Re: HTTP 1.1

2002-04-11 Thread Hrvoje Niksic

Boaz Yahav [EMAIL PROTECTED] writes:

 Is there any way to make Wget use HTTP/1.1 ?

Unfortunately, no.