Alice Bevan–McGregor wrote: > On 2011-01-06 11:11:27 -0800, Adam Tauno Williams said: >> On Thu, 2011-01-06 at 11:07 -0800, Alice Bevan–McGregor wrote: >>> On 2011-01-06 10:00:39 -0800, Adam Tauno Williams said: >>>> With HTTP/1.0 [and WSGI is HTTP/1.0 only] you have to provide a >>>> Content-Length header - so you have to generate the entire response >>>> at once [however you want to muddy "at once"]. >>> >>> Both of these statements are false. >> >> Both these statements are true! I suggest you consult the HTTP spec. > > It's generally polite to provide direct references, either sections or > actual links when asking someone to RTFM. No matter, examining the > HTTP/1.0 RFC (conveniently chopped up and HTML-ified by the w3) I find > evidence to support your argument: > > http://www.w3.org/Protocols/HTTP/1.0/draft-ietf-http-spec.html#Entity-Body
As I read section 7.2.2 (Length) the Content-length header is only required in HTTP *requests* if the body contains data. According to the text it's not required in HTTP *responses*. Ciao, Michael. -- http://mail.python.org/mailman/listinfo/python-list