moonbridge

changeset 186:f7ed5b923331

Changed scope of local target variable in HTTP module
author jbe
date Fri Jun 19 18:57:02 2015 +0200 (2015-06-19)
parents 1019bac12a82
children fac4ea0c4120
files moonbridge_http.lua
line diff
     1.1 --- a/moonbridge_http.lua	Fri Jun 19 18:54:32 2015 +0200
     1.2 +++ b/moonbridge_http.lua	Fri Jun 19 18:57:02 2015 +0200
     1.3 @@ -1001,6 +1001,8 @@
     1.4            return self[key]
     1.5          end
     1.6        end
     1.7 +      -- variable to store request target
     1.8 +      local target
     1.9        -- coroutine for reading headers:
    1.10        local function read_headers()
    1.11          -- initialize limit:
    1.12 @@ -1014,7 +1016,7 @@
    1.13          if limit == 0 then
    1.14            return false, request_error(false, "414 Request-URI Too Long")
    1.15          end
    1.16 -        local target, proto
    1.17 +        local proto
    1.18          request.method, target, proto =
    1.19            line:match("^([^ \t\r]+)[ \t]+([^ \t\r]+)[ \t]*([^ \t\r]*)[ \t]*\r?\n$")
    1.20          if not request.method then

Impressum / About Us