It seems incompatible with Starman and probably confuses other
HTTP/1.0-only servers, too. Our -httpd will respect it and
requires it for persistent connections.
Followup-to: dca2724e0aeb ("examples: disable Chunked response in PSGI example")
my $repobrowse = PublicInbox::Repobrowse->new;
builder {
- enable 'Chunked';
+ # Chunked middleware conflicts with Starman:
+ # https://github.com/miyagawa/Starman/issues/23
+ # enable 'Chunked';
eval {
enable 'Deflater',
content_type => [ 'text/html', 'text/plain',
sub dechunk ($) {
my ($res) = @_;
my $s = $res->content;
- if (lc($res->header('Transfer-Encoding')) eq 'chunked') {
+ if (lc($res->header('Transfer-Encoding') || '') eq 'chunked') {
my $rv = '';
while ($s =~ s/\A([a-f0-9]+)\r\n//i) { # no comment support :x
my $n = hex($1) or last;