41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
|
# File 'lib/overwrite.rb', line 41
def return_task( task )
code = task.running? ? 202 : 200
case request.env['HTTP_ACCEPT']
when /rdf/
response['Content-Type'] = "application/rdf+xml"
halt code,task.to_rdfxml
when /yaml/
response['Content-Type'] = "application/x-yaml"
halt code,task.to_yaml when /html/
response['Content-Type'] = "text/html"
halt code,OpenTox.text_to_html(task.to_yaml, @subjectid)
else response['Content-Type'] = "text/uri-list"
halt code,task.uri+"\n"
end
end
|