summaryrefslogtreecommitdiff
path: root/lazar.rb
diff options
context:
space:
mode:
authormguetlein <martin.guetlein@gmail.com>2010-05-05 15:02:43 +0200
committermguetlein <martin.guetlein@gmail.com>2010-05-05 15:02:43 +0200
commitd598cd65995cc829c2610ff8d40c0431b9f935eb (patch)
treecd5c4fb380423127654a3bd812b4e70d57c4687c /lazar.rb
parentb7763b32a06c37271f05f8bd9e3e0fb12a2aeae5 (diff)
application/x-yaml to text/x-yaml
Diffstat (limited to 'lazar.rb')
-rwxr-xr-x[-rw-r--r--]lazar.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/lazar.rb b/lazar.rb
index fd0067c..9880292 100644..100755
--- a/lazar.rb
+++ b/lazar.rb
@@ -76,8 +76,8 @@ class Lazar < Model
def to_owl
data = YAML.load(yaml)
- activity_dataset = YAML.load(RestClient.get(data.trainingDataset, :accept => 'application/x-yaml').to_s)
- feature_dataset = YAML.load(RestClient.get(data.feature_dataset_uri, :accept => 'application/x-yaml').to_s)
+ activity_dataset = YAML.load(RestClient.get(data.trainingDataset, :accept => 'text/x-yaml').to_s)
+ feature_dataset = YAML.load(RestClient.get(data.feature_dataset_uri, :accept => 'text/x-yaml').to_s)
owl = OpenTox::Owl.create 'Model', uri
owl.set("creator","http://github.com/helma/opentox-model")
owl.set("title","#{URI.decode(activity_dataset.title)} lazar classification")
@@ -108,7 +108,7 @@ 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'
@@ -124,7 +124,7 @@ get '/:id/?' do
end
model.owl
when /yaml/
- response['Content-Type'] = 'application/x-yaml'
+ response['Content-Type'] = 'text/x-yaml'
model.yaml
else
halt 400, "Unsupported MIME type '#{accept}'"