summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authormguetlein <martin.guetlein@gmail.com>2011-05-25 14:00:00 +0200
committermguetlein <martin.guetlein@gmail.com>2011-05-25 14:00:00 +0200
commit54301de3dc118365d09d473b2fb5379fbd135973 (patch)
tree134b18e2e5894533849302cb8750806ee9c5e4a5 /lib
parenta76a0c8d8ee259f1818a5fa2b5c4986fa460d888 (diff)
parentd5bf9fd2b7f4401c36d00ab6afb1a003fdb07d2f (diff)
Merge branch 'development' of github.com:opentox/opentox-ruby into development
Diffstat (limited to 'lib')
-rw-r--r--lib/helper.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/helper.rb b/lib/helper.rb
index 3a6126a..995f3e9 100644
--- a/lib/helper.rb
+++ b/lib/helper.rb
@@ -44,8 +44,9 @@ helpers do
def uri_available?(urlStr)
url = URI.parse(urlStr)
+ subjectidstr = @subjectid ? "?subjectid=#{CGI.escape @subjectid}" : ""
Net::HTTP.start(url.host, url.port) do |http|
- return http.head("#{url.request_uri}?subjectid=#{CGI.escape @subjectid}").code == "200"
+ return http.head("#{url.request_uri}#{subjectidstr}").code == "200"
end
end