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 4bbec31..00c6b84 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