Subject: | Change default headers |
Hi!
Please change default headers of response: Content-Type and Content-Length.
Like this:
# Set the Content-Length if needed
if ( not $stream and not defined $response->header( 'Content-Length' )
and my $l = length $response->content ) {
use bytes;
$response->header( 'Content-Length', $l );
}
# Set the Content-Type if needed
if ( ! defined $response->header( 'Content-Type' ) ) {
$response->header( 'Content-Type', 'text/plain' );
}
i.e., I have the model nginx + proxy_pass to PoCo::Server::SimpleHTTP.
nginx support X-Accel-Redirect and nginx'll set Content-Type and
Content-Length if that headers were empty.
Please add this fix in future release.
Thanks.