if the request is bad give it as a response

This commit is contained in:
Ilya Zhitomirskiy 2011-06-15 17:51:29 -07:00
parent 78253b6885
commit b3cee70ead

View file

@ -20,8 +20,8 @@ class AuthorizationsController < ApplicationController
end
def token
unless(params[:type] == 'client_associate' && params[:manifest_url])
render :text => "bad request", :status => 403
if (!params[:type] == 'client_associate' || !params[:manifest_url])
render :text => "bad request: #{params.inspect}", :status => 403
return
end
manifest = JSON.parse(RestClient.get(params[:manifest_url]).body)