# HG changeset patch # User jbe # Date 1424130653 -3600 # Node ID 5ab8c0260e59fc4909b521324d2f1675e7f91f6c # Parent 9c0520d36f97e24f793b41d6486f22dd3c15fc26 Bugfix in request loop of moonbridge_http.lua: terminate loop if "Connection: close" has been sent to client diff -r 9c0520d36f97 -r 5ab8c0260e59 moonbridge_http.lua --- a/moonbridge_http.lua Tue Feb 17 00:49:02 2015 +0100 +++ b/moonbridge_http.lua Tue Feb 17 00:50:53 2015 +0100 @@ -155,7 +155,7 @@ -- return connect handler: return function(socket) local survive = true -- set to false if process shall be terminated later - while true do + repeat -- desired chunk sizes: local input_chunk_size = options.maximum_input_chunk_size or options.chunk_size or 16384 local output_chunk_size = options.minimum_output_chunk_size or options.chunk_size or 1024 @@ -900,7 +900,7 @@ -- finish request (unless already done by underlying handler): request:finish() end - end + until connection_close_responded return survive end end