From f62710eccf49548c56ee5950a118fcb1cba59eb4 Mon Sep 17 00:00:00 2001 From: Christoph Helma Date: Sat, 19 Dec 2009 13:32:00 +0100 Subject: accept header instead of content-type for names request --- application.rb | 3 +-- 1 file changed, 1 insertion(+), 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 -- cgit v1.2.3