From f8b6f8d19566d372e47edba7968ce66ff09052c9 Mon Sep 17 00:00:00 2001 From: Christoph Helma Date: Thu, 26 Apr 2012 16:04:05 +0200 Subject: tests removed, URI.accessible? check temporarily removed --- lib/opentox.rb | 1 + lib/rest-client-wrapper.rb | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) (limited to 'lib') 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| -- cgit v1.2.3