42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
|
# File 'lib/overwrite.rb', line 42
def return_task( task )
raise "http_code == nil" unless task.http_code!=nil
case request.env['HTTP_ACCEPT']
when /rdf/
response['Content-Type'] = "application/rdf+xml"
halt task.http_code,task.to_rdfxml
when /yaml/
response['Content-Type'] = "application/x-yaml"
halt task.http_code,task.to_yaml when /html/
response['Content-Type'] = "text/html"
redirect task.uri
else response['Content-Type'] = "text/uri-list"
if task.completed?
halt task.http_code,task.resultURI+"\n"
else
halt task.http_code,task.uri+"\n"
end
end
end
|