diff options
author | Andreas Maunz <andreas@maunz.de> | 2011-05-25 13:52:43 +0200 |
---|---|---|
committer | Andreas Maunz <andreas@maunz.de> | 2011-05-25 13:52:43 +0200 |
commit | b5cf8f9b80303696688144d81a61db758ae8fe9f (patch) | |
tree | 74e5b7669db84dd7e1c5e3660553828dfbf68066 /lib/helper.rb | |
parent | d012b9e8da641c342c455a1384ddf3b14f5b5c35 (diff) | |
parent | d5bf9fd2b7f4401c36d00ab6afb1a003fdb07d2f (diff) |
Merge branch 'development' into svm_matrix
Diffstat (limited to 'lib/helper.rb')
-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 |