Browse Source

Merge pull request #48 from lluki/master

matching of mime type in http request header that contain a charset a…
Marcos 8 years ago
parent
commit
dc816cc258
1 changed files with 1 additions and 1 deletions
  1. 1 1
      httpserver-request.lua

+ 1 - 1
httpserver-request.lua

@@ -51,7 +51,7 @@ local function getRequestData(payload)
     if requestData then
       return requestData
     else
-      local mimeType = string.match(payload, "Content%-Type: (%S+)\r\n")
+      local mimeType = string.match(payload, "Content%-Type: ([%w/-]+)")
       local body_start = payload:find("\r\n\r\n", 1, true)
       local body = payload:sub(body_start, #payload)
       payload = nil