webmcp
changeset 24:605488fbf809
Make request.get_json_request_slots return nil, when running WebMCP shell (cgi is nil)
author | bsw |
---|---|
date | Thu Jul 08 19:38:36 2010 +0200 (2010-07-08) |
parents | 3a6fe8663b26 |
children | a02c25eb3517 |
files | framework/env/request/get_json_request_slots.lua |
line diff
1.1 --- a/framework/env/request/get_json_request_slots.lua Fri Jun 04 19:00:34 2010 +0200 1.2 +++ b/framework/env/request/get_json_request_slots.lua Thu Jul 08 19:38:36 2010 +0200 1.3 @@ -7,6 +7,7 @@ 1.4 --]]-- 1.5 1.6 function request.get_json_request_slots(slot_idents) 1.7 + if not cgi then return end 1.8 local slot_idents = cgi.params["_webmcp_json_slots[]"] 1.9 if slot_idents and not request._json_requests_allowed then 1.10 error("JSON requests have not been allowed using request.set_allowed_json_request_slots(...).")