Skip to content

Commit

Permalink
Merge pull request #2 from libryder/master
Browse files Browse the repository at this point in the history
Circular reference error on response object
  • Loading branch information
benlangfeld committed May 3, 2012
2 parents ca11eb9 + 422d912 commit 15849c1
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/ahn-restful-rpc.rb
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,10 @@ def ip_allowed?(ip)

# TODO: set the content-type and other HTTP headers
response_object = rpc_object.send(path, *json)
if defined? response_object.headers
return [200, {"Content-Type" => "application/json"}, Array(response_object.headers.to_json)]
end

[200, {"Content-Type" => "application/json"}, Array(response_object.to_json)]

end
Expand Down

0 comments on commit 15849c1

Please sign in to comment.