diff options
author | mguetlein <martin.guetlein@gmail.com> | 2010-06-25 20:45:49 +0200 |
---|---|---|
committer | mguetlein <martin.guetlein@gmail.com> | 2010-06-25 20:45:49 +0200 |
commit | 1f0f0ab406f90d1eda6c78d2df742fbd9509a679 (patch) | |
tree | 249757248a7cc2da273695f9c7e480783e86b0b3 /application.rb | |
parent | dea432b738663887d817b2b40e6878971613bbba (diff) |
replace text/x-yaml with application/x-yaml
Diffstat (limited to 'application.rb')
-rw-r--r-- | application.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/application.rb b/application.rb index 064d107..d30bb5a 100644 --- a/application.rb +++ b/application.rb @@ -41,8 +41,8 @@ get '/:id/?' do code = task.hasStatus == "Running" ? 202 : 200 case request.env['HTTP_ACCEPT'] - when /text\/x-yaml|\*\/\*/ # matches 'text/x-yaml', '*/*' - response['Content-Type'] = 'text/x-yaml' + when /application\/x-yaml|\*\/\*/ # matches 'application/x-yaml', '*/*' + response['Content-Type'] = 'application/x-yaml' task_content[:uri] = task.uri halt code, task_content.to_yaml when /application\/rdf\+xml|\*\/\*/ @@ -51,7 +51,7 @@ get '/:id/?' do task_content.each{ |k,v| owl.set(k.to_s,v)} halt code, owl.rdf else - halt 400, "MIME type '"+request.env['HTTP_ACCEPT'].to_s+"' not supported, valid Accept-Headers are \"application/rdf+xml\" and \"text/x-yaml\"." + halt 400, "MIME type '"+request.env['HTTP_ACCEPT'].to_s+"' not supported, valid Accept-Headers are \"application/rdf+xml\" and \"application/x-yaml\"." end end |