diff options
Diffstat (limited to 'application.rb')
-rwxr-xr-x[-rw-r--r--] | application.rb | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/application.rb b/application.rb index e0a6abc..a65c881 100644..100755 --- a/application.rb +++ b/application.rb @@ -51,13 +51,14 @@ get '/:id' do case params[:id] when /.yaml$/ params[:id].sub!(/.yaml$/,'') - accept = 'application/x-yaml' + accept = 'text/x-yaml' when /.rdf$/ params[:id].sub!(/.rdf$/,'') accept = 'application/rdf+xml' end begin dataset = Dataset.get(params[:id]) + halt 404, "Dataset #{params[:id]} not found." unless dataset rescue => e raise e.message + e.backtrace halt 404, "Dataset #{params[:id]} not found." @@ -71,7 +72,7 @@ get '/:id' do end dataset.owl when /yaml/ - response['Content-Type'] = 'application/x-yaml' + response['Content-Type'] = 'text/x-yaml' dataset.yaml else halt 400, "Unsupported MIME type '#{accept}'" |