Tatsuhiko Miyagawa > Plack-0.9932 > Plack::Middleware::ContentLength

Download:
Plack-0.9932.tar.gz

Dependencies

Annotate this POD

CPAN RT

New  1
Open  1
View/Report Bugs
Source   Latest Release: Plack-1.0031

NAME ^

Plack::Middleware::ContentLength - Adds Content-Length header automatically

SYNOPSIS ^

  # in app.psgi

  builder {
      enable "Plack::Middleware::ContentLength";
      $app;
  }

  # Or in Plack::Handler::*
  $app = Plack::Middleware::ContentLength->wrap($app);

DESCRIPTION ^

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).

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.

AUTHOR ^

Tatsuhiko Miyagawa

SEE ALSO ^

Rack::ContentLength

syntax highlighting: