Index: [Article Count Order] [Thread]

Date: Fri, 10 Dec 2004 12:20:43 -0500
From: Dan Janowski <danj@3skel.com>
Subject: [webricken:135] Feature diffs
To: webricken@notwork.org
Message-Id: <D241B0E8-4ACF-11D9-B260-000A95CCCA58@3skel.com>
X-Mail-Count: 00135

I have started using webrick and I like it a lot. In my application of 
using it, I made a few feature changes that I wanted to share.

The diff includes the following:

1. make req.attributes available in the accesslog parser as 'n', 
similar to Apache notes. This seemed like a very good place to put 
application information that might be used for enhanced logging.

2. Expose @logger in httpresponse so that any handler can log via the 
server.

3. Added a config :EncodingHandler which gets called after service() in 
the run method. This is a good place to employ content compression. I 
have written a basic deflate, gzip encoder that takes a body and 
compresses it on the fly. This seems to work very well. I need to make 
a few improvements to the encoder, then I will post it as well.

4. filehandler ignores files ending in ~ (emacs terd files). Using 
fnmatch with a single string value is deficient if there are multiple 
patterns to be ignored. A better way may be to check if 
NondisclosureName is an array, then evaluate the series, or to see if 
it is a Regexp object, then just apply that instead.

I look forward to your opinions.

Dan



attatchment (application/octet-stream) ignored