# HG changeset patch # User osimons # Date 1255710983 0 # Node ID 492c18db8f45d1ced193757a126ee17c276a711e # Parent 80e186d15d8e0d76951d2b64a17e89014c8b094e Set the `'Content-Length'` header on master-slave communication. Needed to be http/1.1 compatible. Fixes #475. Thanks pacopablo. diff --git a/bitten/master.py b/bitten/master.py --- a/bitten/master.py +++ b/bitten/master.py @@ -138,6 +138,7 @@ """ Formats and sends the response, raising ``RequestDone``. """ req.send_response(code) headers = headers or {} + headers.setdefault('Content-Length', len(body)) for header in headers: req.send_header(header, headers[header]) req.write(body)