Browse Source

No longer crashes when request is HTTP 1.0

Marcos Kirsch 9 years ago
parent
commit
84f7a06aa1
1 changed files with 1 additions and 1 deletions
  1. 1 1
      httpserver.lua

+ 1 - 1
httpserver.lua

@@ -17,7 +17,7 @@ local function parseRequest(request)
    if not e then return nil end
    local line = request:sub(1, e - 1)
    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
 end