Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

PM::ErrorDocument: removing Content-Encoding and Transfer-Encoding. #430

Merged
merged 1 commit into from

3 participants

@kazeburo

If original response has Content-Encoding: gzip or Transfer-Encoding: chunked header,
the error-document will be decoding error in HTTP client.

@coveralls

Coverage Status

Coverage decreased (-0.03%) when pulling 93f2cee on kazeburo:master into 365d440 on plack:master.

@miyagawa miyagawa merged commit 6e3c7a7 into from
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Sep 9, 2013
  1. @kazeburo
This page is out of date. Refresh to see the latest.
Showing with 2 additions and 0 deletions.
  1. +2 −0  lib/Plack/Middleware/ErrorDocument.pm
View
2  lib/Plack/Middleware/ErrorDocument.pm
@@ -61,6 +61,8 @@ sub call {
} else {
my $h = Plack::Util::headers($r->[1]);
$h->remove('Content-Length');
+ $h->remove('Content-Encoding');
+ $h->remove('Transfer-Encoding');
$h->set('Content-Type', Plack::MIME->mime_type($path));
open my $fh, "<", $path or die "$path: $!";
Something went wrong with that request. Please try again.