equal
deleted
inserted
replaced
240 origin = check_credentials(request); |
240 origin = check_credentials(request); |
241 if not origin then |
241 if not origin then |
242 return post_errors.new("unauthz"); |
242 return post_errors.new("unauthz"); |
243 end |
243 end |
244 from = jid.join(origin.username, origin.host, origin.resource); |
244 from = jid.join(origin.username, origin.host, origin.resource); |
|
245 origin.type = "c2s"; |
245 end |
246 end |
246 local payload, err = parse_request(request, path); |
247 local payload, err = parse_request(request, path); |
247 if not payload then |
248 if not payload then |
248 -- parse fail |
249 -- parse fail |
249 local ctx = { error = err, type = request.headers.content_type, data = request.body, }; |
250 local ctx = { error = err, type = request.headers.content_type, data = request.body, }; |