From ddb83b4302e8628b333402d24e3e05fc90b3faef Mon Sep 17 00:00:00 2001 From: Christoph Helma Date: Wed, 10 Jul 2013 14:36:39 +0200 Subject: subjectids partially removed --- lib/rest-client-wrapper.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/rest-client-wrapper.rb') diff --git a/lib/rest-client-wrapper.rb b/lib/rest-client-wrapper.rb index f3e6300..2de9377 100644 --- a/lib/rest-client-wrapper.rb +++ b/lib/rest-client-wrapper.rb @@ -17,7 +17,7 @@ module OpenTox # check input bad_request_error "Headers are not a hash: #{headers.inspect}", uri unless headers==nil or headers.is_a?(Hash) - @subjectid = headers[:subjectid] ? headers[:subjectid] : nil + headers[:subjectid] ||= OpenTox::SUBJECTID bad_request_error "Invalid URI: '#{uri}'", uri unless URI.valid? uri #resource_not_found_error "URI '#{uri}' not found.", uri unless URI.accessible?(uri, @subjectid) unless URI.ssl?(uri) # make sure that no header parameters are set in the payload -- cgit v1.2.3