moonbridge

changeset 31:5ab8c0260e59

Bugfix in request loop of moonbridge_http.lua: terminate loop if "Connection: close" has been sent to client
author jbe
date Tue Feb 17 00:50:53 2015 +0100 (2015-02-17)
parents 9c0520d36f97
children fd542c33020b
files moonbridge_http.lua
line diff
     1.1 --- a/moonbridge_http.lua	Tue Feb 17 00:49:02 2015 +0100
     1.2 +++ b/moonbridge_http.lua	Tue Feb 17 00:50:53 2015 +0100
     1.3 @@ -155,7 +155,7 @@
     1.4    -- return connect handler:
     1.5    return function(socket)
     1.6      local survive = true  -- set to false if process shall be terminated later
     1.7 -    while true do
     1.8 +    repeat
     1.9        -- desired chunk sizes:
    1.10        local input_chunk_size = options.maximum_input_chunk_size or options.chunk_size or 16384
    1.11        local output_chunk_size = options.minimum_output_chunk_size or options.chunk_size or 1024
    1.12 @@ -900,7 +900,7 @@
    1.13          -- finish request (unless already done by underlying handler):
    1.14          request:finish()
    1.15        end
    1.16 -    end
    1.17 +    until connection_close_responded
    1.18      return survive
    1.19    end
    1.20  end

Impressum / About Us