Skip to content

Commit

Permalink
docs for ContentLength middleware
Browse files Browse the repository at this point in the history
  • Loading branch information
miyagawa committed Sep 30, 2009
1 parent b7c7bcc commit d449d77
Showing 1 changed file with 41 additions and 0 deletions.
41 changes: 41 additions & 0 deletions lib/Plack/Middleware/ContentLength.pm
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,44 @@ sub call {
}

1;

__END__
=head1 NAME
Plack::Middleware::ContentLength - Adds Content-Length header automatically
=head1 SYNOPSIS
# in app.psgi
use Plack::Middleware qw(ContentLength);
builder {
enable Plack::Middleware::ContentLength;
$app;
}
# Or in Plack::Server::*
$app = Plack::Middleware::ContentLength->wrap($app);
=head1 DESCRIPTION
Plack::Middleware::ContentLength is a middleware that automatically
adds C<Content-Length> header when it's appropriate i.e. the response
has a content body with calculatable size (array of chunks or a real
filehandle).
This middleware can also be used as a library from PSGI server
implementations to automatically set C<Content-Length> rather than in
the end user level.
=head1 AUTHOR
Tatsuhiko Miyagawa
=head1 SEE ALSO
Rack::ContentLength
=cut

0 comments on commit d449d77

Please sign in to comment.