++ed by:
JAITKEN ARJONES SARTAK DCPETROV GRAF

20 PAUSE users
4 non-PAUSE users.

Dave Rolsky
and 13 contributors

NAME

Web::Machine::Util::BodyEncoding - Module to handle body encoding

VERSION

version 0.15

SYNOPSIS

  use Web::Machine::Util::BodyEncoding;

DESCRIPTION

This handles the body encoding.

FUNCTIONS

encode_body_if_set ( $resource, $response, $metadata )

If the $response has a body, this will call encode_body.

encode_body ( $resource, $response, $metadata )

This will find the right encoding (from the 'Content-Encoding' entry in the $metadata HASH ref) and the right charset (from the 'Charset' entry in the $metadata HASH ref), then find the right transformers in the $resource. After that it will attempt to convert the charset and encode the body of the $response. Once completed it will set the Content-Length header in the response as well.

CAVEAT: Note that currently this subroutine doesn't do anything when the body is returned as a CODE ref. This is a bug to be remedied in the future.

AUTHOR

Stevan Little <stevan.little@iinteractive.com>

CONTRIBUTORS

  • Andreas Marienborg <andreas.marienborg@gmail.com>

  • Andrew Nelson <anelson@cpan.org>

  • Arthur Axel 'fREW' Schmidt <frioux@gmail.com>

  • Carlos Fernando Avila Gratz <cafe@q1software.com>

  • Dave Rolsky <autarch@urth.org>

  • Fayland Lam <fayland@gmail.com>

  • George Hartzell <hartzell@alerce.com>

  • Gregory Oschwald <goschwald@maxmind.com>

  • Jesse Luehrs <doy@tozt.net>

  • John SJ Anderson <genehack@genehack.org>

  • Mike Raynham <enquiries@mikeraynham.co.uk>

  • Mike Raynham <mike.raynham@spareroom.co.uk>

  • Olaf Alders <olaf@wundersolutions.com>

  • Thomas Sibley <tsibley@cpan.org>

COPYRIGHT AND LICENSE

This software is copyright (c) 2014 by Infinity Interactive, Inc..

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.