libs/lucid-http: make chunksinks cope with string-like udata
authorJo-Philipp Wich <jow@openwrt.org>
Sat, 25 Jul 2009 00:55:24 +0000 (00:55 +0000)
committerJo-Philipp Wich <jow@openwrt.org>
Sat, 25 Jul 2009 00:55:24 +0000 (00:55 +0000)
libs/lucid-http/luasrc/lucid/http/server.lua

index 4bbec31a1389090cd54bff7b4cd527be42f1a447..00c6b841610683843486aafd381ed275d63454c2 100644 (file)
@@ -288,7 +288,7 @@ local function chunksink(sock)
                if not chunk then
                        return sock:writeall("0\r\n\r\n")
                else
-                       return sock:writeall(("%X\r\n%s\r\n"):format(#chunk, chunk))
+                       return sock:writeall(("%X\r\n%s\r\n"):format(#chunk, tostring(chunk)))
                end
        end
 end