projects
/
project
/
luci.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
libs/sgi-uhttpd: do not assume env.CONTENT_LENGTH to be a number
[project/luci.git]
/
libs
/
sgi-uhttpd
/
luasrc
/
sgi
/
uhttpd.lua
diff --git
a/libs/sgi-uhttpd/luasrc/sgi/uhttpd.lua
b/libs/sgi-uhttpd/luasrc/sgi/uhttpd.lua
index
5915b69
..
bca874e
100644
(file)
--- a/
libs/sgi-uhttpd/luasrc/sgi/uhttpd.lua
+++ b/
libs/sgi-uhttpd/luasrc/sgi/uhttpd.lua
@@
-43,7
+43,7
@@
function handle_request(env)
renv["HTTP_" .. k] = v
end
renv["HTTP_" .. k] = v
end
- local len =
env.CONTENT_LENGTH
or 0
+ local len =
tonumber(env.CONTENT_LENGTH)
or 0
local function recv()
if len > 0 then
local rlen, rbuf = uhttpd.recv(4096)
local function recv()
if len > 0 then
local rlen, rbuf = uhttpd.recv(4096)