No longer crashes when request is HTTP 1.0
This commit is contained in:
parent
a43fc20230
commit
84f7a06aa1
@ -17,7 +17,7 @@ local function parseRequest(request)
|
|||||||
if not e then return nil end
|
if not e then return nil end
|
||||||
local line = request:sub(1, e - 1)
|
local line = request:sub(1, e - 1)
|
||||||
local r = {}
|
local r = {}
|
||||||
_, i, r.method, r.uri = line:find("^([A-Z]+) (.-) HTTP/[1-9]+.[1-9]+$")
|
_, i, r.method, r.uri = line:find("^([A-Z]+) (.-) HTTP/[1-9]+.[0-9]+$")
|
||||||
return r
|
return r
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user