247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
|
# File 'lib/vpim/agent/main.rb', line 247
def do_GET(req, resp)
body = ''
folder = *@options
repo = Vpim::Repo::Apple3.new($ical_folder)
rest = Vpim::Agent::Calendars.new(repo)
path = Vpim::Agent::Path.new(req.request_uri, req.path)
begin
body, form = rest.get(path)
status = 200
rescue Vpim::Agent::NotFound
body = $!.to_s
form = "text/plain" status = 404
end
resp.status = status
resp.body = body
resp['content-type'] = form
end
|