websec-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Gzip doesn't seem to play well with HTTPS


From: Göran Uddeborg
Subject: Gzip doesn't seem to play well with HTTPS
Date: Tue, 30 Apr 2013 23:00:14 +0200

I instructed websec to monitor a page which is only available via
HTTPS.  But I never got any reasonable results, always only garbled
text.

I stripped down the code piece by piece, and realised this somehow
conflicts with the gzip compression.  If I disable that, by setting
$feature_compress to 0 rather than 1 on the first line, things seems
to work much better.

LWP::UserAgent also seems to have built-in support for doing the
unzipping.  If I use the convenience function "get" augmented with
support for compression like this:

        my $enc = HTTP::Message::decodable;
        my $response = $ua->get(<https-url>, "Accept-Encoding" => $enc);

        if ($response->is_success) {
            print $response->decoded_content;

I do get a correct response.  For some reason, decoded_content does
not seem to be available when building the request "by hand" like in
websec.  I haven't figured out why, but I'm not very proficient with
perl.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]