mod_rest/mod_rest.lua
changeset 4845 f69c5a443156
parent 4749 d29a295cd165
child 4892 dc7c9ae15f43
equal deleted inserted replaced
4844:e9b7c8db3ebd 4845:f69c5a443156
   295 			return post_errors.new("mediatype", ctx);
   295 			return post_errors.new("mediatype", ctx);
   296 		end
   296 		end
   297 		return post_errors.new("parse", ctx);
   297 		return post_errors.new("parse", ctx);
   298 	end
   298 	end
   299 
   299 
   300 	if payload.attr.xmlns then
   300 	if (payload.attr.xmlns or "jabber:client") ~= "jabber:client" then
   301 		return post_errors.new("xmlns");
   301 		return post_errors.new("xmlns");
   302 	elseif payload.name ~= "message" and payload.name ~= "presence" and payload.name ~= "iq" then
   302 	elseif payload.name ~= "message" and payload.name ~= "presence" and payload.name ~= "iq" then
   303 		return post_errors.new("name");
   303 		return post_errors.new("name");
   304 	end
   304 	end
   305 
   305