Skip to content

Commit

Permalink
Applied a patch to fix RT#122782 (Problem with compression in server
Browse files Browse the repository at this point in the history
mode)
  • Loading branch information
cwallacetlc authored and redhotpenguin committed May 14, 2018
1 parent 47ec870 commit 973e9ec
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions lib/SOAP/Transport/HTTP.pm
Original file line number Diff line number Diff line change
Expand Up @@ -493,6 +493,11 @@ sub make_response {
&& ( $self->options->{compress_threshold} || 0 ) <
SOAP::Utils::bytelength $response;

if ($] > 5.007 && $encoding) {
require Encode;
$response = Encode::encode( $encoding, $response );
}

$response = Compress::Zlib::compress($response) if $compressed;

# this next line does not look like a good test to see if something is multipart
Expand All @@ -512,9 +517,7 @@ sub make_response {
&& $encoding ? 'charset=' . lc($encoding) : () ),
'Content-Length' => SOAP::Utils::bytelength $response
),
( $] > 5.007 )
? do { require Encode; Encode::encode( $encoding, $response ) }
: $response,
$response,
) );

$self->response->headers->header( 'Content-Type' =>
Expand Down

0 comments on commit 973e9ec

Please sign in to comment.