]> git.ipfire.org Git - thirdparty/tornado.git/commit
Decouple read_from_buffer's search for the endpoint from consuming the data.
authorBen Darnell <ben@bendarnell.com>
Mon, 12 May 2014 03:43:55 +0000 (23:43 -0400)
committerBen Darnell <ben@bendarnell.com>
Mon, 12 May 2014 03:43:55 +0000 (23:43 -0400)
commitf16ef3c1da730a8235c5305b503037c4aa5602bc
treec1a35f3004ea6446c333a8f870598e50bc0cc201
parent4ee968c1d588d023e28812e004a32a4263f7ad01
Decouple read_from_buffer's search for the endpoint from consuming the data.

This lets us call find_read_pos from read_to_buffer_loop, avoiding some
unnecessary reads (e.g. it previously took a minimum of two recv calls
to serve an http request, but now we can do it in one).
tornado/iostream.py