diff options
author | Christoph Helma <helma@in-silico.de> | 2009-12-19 13:32:00 +0100 |
---|---|---|
committer | Christoph Helma <helma@in-silico.de> | 2009-12-19 13:32:00 +0100 |
commit | f62710eccf49548c56ee5950a118fcb1cba59eb4 (patch) | |
tree | c9cbd13aaad565b1c94635aa9ca24750006f9a95 | |
parent | c72d67848f2b339e7ae3dfc985bbd318c55aa999 (diff) |
accept header instead of content-type for names request
-rw-r--r-- | application.rb | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/application.rb b/application.rb index 4ee4522..567c743 100644 --- a/application.rb +++ b/application.rb @@ -21,8 +21,7 @@ get %r{/(.+)} do |inchi| # catches all remaining get requests uri = File.join CACTUS_URI,inchi,"names" RestClient.get(uri).to_s else - status 400 - "Unsupported MIME type '#{request.content_type}'" + halt 400, "Unsupported MIME type '#{request.env['HTTP_ACCEPT']}'" end end |