             res.write = write
             res.end = end
 
-            headers['Content-Length'] = content.length
+            headers[getHeaderName headers, 'content-length'] = content.length
 
             # Send everything on the way
             res.writeHead statusCode, headers

        else
          handler
  handlers

exports.create = (options) ->
  # Short circuit if no plugins were provided

        headers = reasonPhrase
      headers or= res.headers

      contentType = headers?[getHeaderName headers, 'content-type']?.split(';')[0]

      if handlers[contentType]
        # Divert the content stream for further processing
