From: Lukas Rist Date: Mon, 13 Oct 2014 12:06:02 +0000 (+0200) Subject: Fixed example in doc string X-Git-Tag: v4.1.0b1~64^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=refs%2Fpull%2F1222%2Fhead;p=thirdparty%2Ftornado.git Fixed example in doc string We have to pass a HTTPHeaders object to write_headers() --- diff --git a/tornado/httpserver.py b/tornado/httpserver.py index 05d0e186c..d4c990caa 100644 --- a/tornado/httpserver.py +++ b/tornado/httpserver.py @@ -56,7 +56,7 @@ class HTTPServer(TCPServer, httputil.HTTPServerConnectionDelegate): message = "You requested %s\n" % request.uri request.connection.write_headers( httputil.ResponseStartLine('HTTP/1.1', 200, 'OK'), - {"Content-Length": str(len(message))}) + httputil.HTTPHeaders({"Content-Length": str(len(message))})) request.connection.write(message) request.connection.finish()