[Twisted-Python] t.web.proxy ignores response body if no Content-Length
nico at tekNico.net
Wed Dec 3 07:20:37 EST 2003
-----BEGIN PGP SIGNED MESSAGE-----
The connectionLost method of t.web.proxy.ProxyClient neglects to call its
namesake in the t.protocols.http.HTTPClient superclass.
The later thoughtfully calls self.handleResponseEnd() when the connection is
lost; such behaviour is needed as a fallback, when a broken web server (the so
called "Apache Coyote 1.0" inside Jakarta Tomcat 4.0) omits to send a
"Content-Length" header (nor a "Transfer-Encoding" one) with a non-null (and
non-chunked) response body.
Keeping with the old, and always valid, Internet adage:
"Be strict in what you send, and lenient in what you receive"
or some such. :^)
Opened bug #419 in the tracker for this, with one-line patch attached.
"I can think of two reasons for running Windows software.
A: Your fascist employer is a nitwit and approves of nonsense
like Lotus Notes, which oughta be illegal.
B: You're running games." -- Helgi Hrafn Gunnarsson
Nicola Larosa - nico at tekNico.net
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (GNU/Linux)
-----END PGP SIGNATURE-----
More information about the Twisted-Python