Fix sgi-wsapi and sgi-luci to be standards compliant
[project/luci.git] / libs / httpd / luasrc / httpd / handler / luci.lua
index 65f3f01..1871511 100644 (file)
@@ -84,10 +84,13 @@ function Luci.handle_get(self, request, sourcein, sinkerr)
                elseif not id then
                        return true
                elseif id == 5 then
-                       return nil
-               else
+                       return true
+               elseif id == 4 then
                        return data
                end
+               if coroutine.status(x) == "dead" then
+                       return nil
+               end
        end
 
        headers["Expires"] = luci.http.protocol.date.to_http( os.time() )