"Content-Length" header

Peter Kleiweg in.aqua.scribis at nl.invalid
Mon Aug 30 23:41:52 CEST 2004


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. Use the correct url, and you do
get content-length.

WTH is Ethereal?


-- 
Peter Kleiweg  L:NL,af,da,de,en,ia,nds,no,sv,(fr,it)  S:NL,de,en,(da,ia)
info: http://www.let.rug.nl/~kleiweg/ls.html




More information about the Python-list mailing list