* 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 2bb44bd022734eb371ae1066a6e818df9864b2c4..2c415009e0fccb2ca44a90ba82580b9ee3d2075c 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$","")