diff options
author | mguetlein <martin.guetlein@gmail.com> | 2011-05-25 14:00:00 +0200 |
---|---|---|
committer | mguetlein <martin.guetlein@gmail.com> | 2011-05-25 14:00:00 +0200 |
commit | 54301de3dc118365d09d473b2fb5379fbd135973 (patch) | |
tree | 134b18e2e5894533849302cb8750806ee9c5e4a5 /lib | |
parent | a76a0c8d8ee259f1818a5fa2b5c4986fa460d888 (diff) | |
parent | d5bf9fd2b7f4401c36d00ab6afb1a003fdb07d2f (diff) |
Merge branch 'development' of github.com:opentox/opentox-ruby into development
Diffstat (limited to 'lib')
-rw-r--r-- | lib/helper.rb | 3 |
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 |