libs/web: Fixed bug where the environment table gets returned in case of an undefined...
authorSteven Barth <steven@midlink.org>
Mon, 23 Jun 2008 23:35:25 +0000 (23:35 +0000)
committerSteven Barth <steven@midlink.org>
Mon, 23 Jun 2008 23:35:25 +0000 (23:35 +0000)
libs/web/luasrc/http.lua

index 5263bfaad15c4af3ed0de13e8c6b3043ea8dac4e..bb05c680b1072c1e23f1ac991373e18e9dacd890 100644 (file)
@@ -89,7 +89,11 @@ function Request.formvaluetable(self, prefix)
 end
 
 function Request.getenv(self, name)
-       return name and self.message.env[name] or self.message.env
+       if name then
+               return self.message.env[name]
+       else
+               return self.message.env
+       end
 end
 
 function Request.setfilehandler(self, callback)