* luci/libs: fix possible error when doing sub() on chunk in server.lua
authorJo-Philipp Wich <jow@openwrt.org>
Mon, 23 Jun 2008 19:20:57 +0000 (19:20 +0000)
committerJo-Philipp Wich <jow@openwrt.org>
Mon, 23 Jun 2008 19:20:57 +0000 (19:20 +0000)
libs/httpd/luasrc/httpd/server.lua

index 2bb44bd..2c41500 100644 (file)
@@ -124,7 +124,7 @@ function Server.create_client_sources(self, client)
                                or  "Unexpected EOF"
 
                -- Line ok
-               else
+               elseif chunk ~= nil
 
                        -- Strip trailing CR
                        chunk = chunk:gsub("\r$","")