summaryrefslogtreecommitdiff
path: root/application.rb
diff options
context:
space:
mode:
Diffstat (limited to 'application.rb')
-rw-r--r--application.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/application.rb b/application.rb
index c64d5ce..cdbaef2 100644
--- a/application.rb
+++ b/application.rb
@@ -168,10 +168,14 @@ get '/:id' do
response['Content-Type'] = 'application/ms-excel'
File.open(file).read
- when /chemical\/x-mdl-sdfile/
+ when /sdfile/
response['Content-Type'] = 'chemical/x-mdl-sdfile'
YAML.load_file(@yaml_file).to_sdf
+ when /uri-list/
+ response['Content-Type'] = 'text/uri-list'
+ YAML.load_file(@yaml_file).to_urilist
+
else
raise OpenTox::NotFoundError.new "Content-type #{@accept} not supported."
end