diff options
-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 |