Class Mack::Utils::ContentLengthHandler
In: lib/mack/utils/content_length_handler.rb
Parent: Object

The whole purpose of this handler is to intercept the rack application process, calculate the size of the response body, and set the ‘Content-Length’ header if necessary.

From: thin.lighthouseapp.com/projects/7212/tickets/74 Content-Length should not be automatically added:

  • When the Status code is 1xx, 204 or 304
  • When the Transfer-Encoding header is set to chunked
  • When the body is neither a String or an Array

Attributes

response  [R] 

[Validate]