summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Maunz <andreas@maunz.de>2011-07-21 14:01:40 +0200
committerAndreas Maunz <andreas@maunz.de>2011-07-21 14:01:40 +0200
commit4f98fc6c5733e4f2760f73c93f437b062d6a8695 (patch)
treedd8d85e189c17a20dee09dd2b27314c58ebbea65
parent3bc3b9b907acbb396463188e34cb04e99da1fb57 (diff)
Support for SDF in GET
-rw-r--r--application.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/application.rb b/application.rb
index a77d5d3..c64d5ce 100644
--- a/application.rb
+++ b/application.rb
@@ -168,6 +168,10 @@ get '/:id' do
response['Content-Type'] = 'application/ms-excel'
File.open(file).read
+ when /chemical\/x-mdl-sdfile/
+ response['Content-Type'] = 'chemical/x-mdl-sdfile'
+ YAML.load_file(@yaml_file).to_sdf
+
else
raise OpenTox::NotFoundError.new "Content-type #{@accept} not supported."
end