diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/opentox.rb | 1 | ||||
-rw-r--r-- | lib/rest-client-wrapper.rb | 3 |
2 files changed, 3 insertions, 1 deletions
diff --git a/lib/opentox.rb b/lib/opentox.rb index 187eb08..6ce439d 100644 --- a/lib/opentox.rb +++ b/lib/opentox.rb @@ -111,6 +111,7 @@ module OpenTox end def create service_uri, subjectid=nil + #uri = uri(SecureRandom.uuid) uri = RestClientWrapper.post(service_uri, {}, {:accept => 'text/uri-list', :subjectid => subjectid}) URI.task?(service_uri) ? from_uri(uri, subjectid, false) : from_uri(uri, subjectid) end diff --git a/lib/rest-client-wrapper.rb b/lib/rest-client-wrapper.rb index 479d5a5..3071432 100644 --- a/lib/rest-client-wrapper.rb +++ b/lib/rest-client-wrapper.rb @@ -18,7 +18,8 @@ module OpenTox # check input @subjectid = headers[:subjectid] ? headers[:subjectid] : nil bad_request_error "Invalid URI: '#{uri}'" unless URI.valid? uri - not_found_error "URI '#{uri}' not found." unless URI.accessible?(uri, @subjectid) unless URI.ssl?(uri) + #TODO fix for internal installations + #not_found_error "URI '#{uri}' not found." unless URI.accessible?(uri, @subjectid) unless URI.ssl?(uri) bad_request_error "Headers are not a hash: #{headers.inspect}" unless headers==nil or headers.is_a?(Hash) # make sure that no header parameters are set in the payload [:accept,:content_type,:subjectid].each do |header| |