"Content-Length" header

Grant Edwards grante at visi.com
Mon Aug 30 18:01:14 EDT 2004


On 2004-08-30, Peter Kleiweg <in.aqua.scribis at nl.invalid> wrote:
> Grant Edwards schreef:
>
>> I'll tell you _one_more_time_:  use Ethereal.  Here's the
>> transaction for your first URL:
>>
>>   GET /~harnad/temp/ariadne-rae.doc HTTP/1.0
>>   Host: www.ecs.soton.ac.uk
>>   User-agent: Python-urllib/1.15
>>
>>   HTTP/1.1 404 Not Found
>>   Date: Mon, 30 Aug 2004 21:27:42 GMT
>>   Server: Apache/1.3.27 (Unix)  (Red-Hat/Linux) mod_ssl/2.8.12
>>   OpenSSL/0.9.6b DAV/1.0.3 PHP/4.3.2 mod_perl/1.26
>>   Connection: close
>>   Content-Type: text/html; charset=iso-8859-1
>>
>>   <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
>>   <HTML><HEAD>
>>   <TITLE>404 Not Found</TITLE>
>>   </HEAD><BODY>
>>   <H1>Not Found</H1>
>>   The requested URL /~harnad/temp/ariadne-rae.doc was not found
>>   on this server.<P>
>>   <HR>
>>   <ADDRESS>Apache/1.3.27 Server at www.ecs.soton.ac.uk Port
>>   80</ADDRESS>
>>   </BODY></HTML>
>>
>> THERE IS NO CONTENT-LENGTH HEADER.  What do you expect urllib
>> to do?
>
> That is because you made a typo.

No, I didn't. I did a cut/paste to transfer his code into a
file and run it.   The OP's program is using invalid URLs.

> Use the correct url, and you do get content-length.

Tell that to the guy who wrote the friggin' program that
contained the URLs.

> WTH is Ethereal?

www.ethereal.com

-- 
Grant Edwards                   grante             Yow!  I want to TAKE IT
                                  at               HOME and DRESS IT UP in
                               visi.com            HOT PANTS!!



More information about the Python-list mailing list