mod_rest/mod_rest.lua
changeset 4959 537054999093
parent 4947 e67cc71727ca
child 4992 732229fe68ab
equal deleted inserted replaced
4958:e8a487c42b36 4959:537054999093
   303 		if not origin then
   303 		if not origin then
   304 			return post_errors.new("unauthz");
   304 			return post_errors.new("unauthz");
   305 		end
   305 		end
   306 		from = jid.join(origin.username, origin.host, origin.resource);
   306 		from = jid.join(origin.username, origin.host, origin.resource);
   307 		origin.type = "c2s";
   307 		origin.type = "c2s";
       
   308 		origin.log = module._log;
   308 	end
   309 	end
   309 	local payload, err = parse_request(request, path);
   310 	local payload, err = parse_request(request, path);
   310 	if not payload then
   311 	if not payload then
   311 		-- parse fail
   312 		-- parse fail
   312 		local ctx = { error = err, type = request.headers.content_type, data = request.body, };
   313 		local ctx = { error = err, type = request.headers.content_type, data = request.body, };