# HG changeset patch # User bsw # Date 1278610716 -7200 # Node ID 605488fbf809bcecb5ea9d5db99a671c325571ee # Parent 3a6fe8663b26f247f003d46803ee447a3278731e Make request.get_json_request_slots return nil, when running WebMCP shell (cgi is nil) diff -r 3a6fe8663b26 -r 605488fbf809 framework/env/request/get_json_request_slots.lua --- a/framework/env/request/get_json_request_slots.lua Fri Jun 04 19:00:34 2010 +0200 +++ b/framework/env/request/get_json_request_slots.lua Thu Jul 08 19:38:36 2010 +0200 @@ -7,6 +7,7 @@ --]]-- function request.get_json_request_slots(slot_idents) + if not cgi then return end local slot_idents = cgi.params["_webmcp_json_slots[]"] if slot_idents and not request._json_requests_allowed then error("JSON requests have not been allowed using request.set_allowed_json_request_slots(...).")