Displaying 2 results from an estimated 2 matches for "abstractservlet".
2006 Feb 20
0
vpimd, a personal information server
...39;'
#--------------------------------------------------------------------------------
# Mount services
##### Vcard Birthdays as iCalendar
$vcf_bday_file = ''vpim-bday.vcf''
$vcf_bday_path = ''/vcf/bday.ics''
class VcfBdayIcsServlet < WEBrick::HTTPServlet::AbstractServlet
def do_GET(req, resp)
cal = Vpim::Icalendar.create
open($vcf_bday_file) do |vcf|
Vpim::Vcard.decode(vcf).each do |card|
begin
bday = card.birthday
if bday
cal.push Vpim::Icalendar::Vevent.create_yearly(
card.birthday,...
2007 Dec 03
1
Originating Client Request
...;s rather than
hypens and any linefeed issues). It''s imperative a capture this
exactly as it was sent by the client as this is an essential part of
my rails application.
I wrote a very simple WEBrick Servlet which does this:
class OriginatingHeaderServlet < WEBrick::HTTPServlet::AbstractServlet
def do_GET(request, response)
response[''Content-Type''] = ''text/plain''
response.status = 200
response.body = request.to_s
end
end
which produces...
GET /header HTTP/1.1
User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X; en-us)
AppleWeb...