Code bellow was originaly copied from Rack::CommonLogger raw.github.com/rack/rack/master/lib/rack/commonlogger.rb
[Validate]