Plack::Middleware::ContentLength - Adds Content-Length header automatically
# in app.psgi builder { enable "Plack::Middleware::ContentLength"; $app; } # Or in Plack::Server::* $app = Plack::Middleware::ContentLength->wrap($app);
Plack::Middleware::ContentLength is a middleware that automatically adds Content-Length header when it's appropriate i.e. the response has a content body with calculable size (array of chunks or a real filehandle).
Content-Length
This middleware can also be used as a library from PSGI server implementations to automatically set Content-Length rather than in the end user level.
Tatsuhiko Miyagawa
Rack::ContentLength
To install Plack, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Plack
CPAN shell
perl -MCPAN -e shell install Plack
For more information on module installation, please visit the detailed CPAN module installation guide.