summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristoph Helma <helma@in-silico.de>2010-03-10 12:00:48 +0100
committerChristoph Helma <helma@in-silico.de>2010-03-10 12:00:48 +0100
commit709295d23c46fa785e0fd523ba8ff0d297bb4fcd (patch)
tree2daf52e86388b37a2f66c320143950e60e06a6e8
parentb8ae8ab4ec09a382e388b61bf38cb641fde12616 (diff)
newline added to end of uri-lists
-rw-r--r--application.rb10
1 files changed, 5 insertions, 5 deletions
diff --git a/application.rb b/application.rb
index 8d59fc4..f06afae 100644
--- a/application.rb
+++ b/application.rb
@@ -27,7 +27,7 @@ get %r{/(.+)} do |inchi| # catches all remaining get requests
when "text/plain"
response['Content-Type'] = "text/plain"
uri = File.join CACTUS_URI,inchi,"names"
- RestClient.get(uri).to_s
+ RestClient.get(uri).to_s
else
halt 400, "Unsupported MIME type '#{request.env['HTTP_ACCEPT']}'"
end
@@ -39,13 +39,13 @@ post '/?' do
response['Content-Type'] = 'text/uri-list'
case request.content_type
when /chemical\/x-daylight-smiles/
- OpenTox::Compound.new(:smiles => input).uri
+ OpenTox::Compound.new(:smiles => input).uri + "\n"
when /chemical\/x-inchi/
- OpenTox::Compound.new(:inchi => input).uri
+ OpenTox::Compound.new(:inchi => input).uri + "\n"
when /chemical\/x-mdl-sdfile|chemical\/x-mdl-molfile/
- OpenTox::Compound.new(:sdf => input).uri
+ OpenTox::Compound.new(:sdf => input).uri + "\n"
when /text\/plain/
- OpenTox::Compound.new(:name => input).uri
+ OpenTox::Compound.new(:name => input).uri + "\n"
else
status 400
"Unsupported MIME type '#{request.content_type}'"