diff options
author | mguetlein <martin.guetlein@gmail.com> | 2011-05-26 12:19:50 +0200 |
---|---|---|
committer | mguetlein <martin.guetlein@gmail.com> | 2011-05-26 12:19:50 +0200 |
commit | 645045dc2afe3323d5bf9968ffe842665398bd67 (patch) | |
tree | 7246273ef081b392fec00f196eba935afc38dd9d /application.rb | |
parent | 4dac8a5e47a4cc85c4bafc805cd3e52be2a53669 (diff) |
fix html for algorithms
Diffstat (limited to 'application.rb')
-rw-r--r-- | application.rb | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/application.rb b/application.rb index 55a8ea4..32fea95 100644 --- a/application.rb +++ b/application.rb @@ -22,6 +22,13 @@ end # # @return [text/uri-list] algorithm URIs get '/?' do - response['Content-Type'] = 'text/uri-list' - [ url_for('/lazar', :full), url_for('/fminer/bbrc', :full), url_for('/fminer/last', :full) ].join("\n") + "\n" + list = [ url_for('/lazar', :full), url_for('/fminer/bbrc', :full), url_for('/fminer/last', :full) ].join("\n") + "\n" + case request.env['HTTP_ACCEPT'] + when /text\/html/ + content_type "text/html" + OpenTox.text_to_html list + else + content_type 'text/uri-list' + list + end end |