Thread LWP::UserAgent: unterschiedliche Content-Encoding bei Response (28 answers)
Opened by GwenDragon at 2012-10-22 12:40

Linuxer
 2012-10-22 14:15
#162734 #162734
User since
2006-01-27
3870 Artikel
HausmeisterIn

user image
Hm, mal wild geraten:

CPAN:HTTP::Message verlangt nach einem CPAN:IO::Uncompress::Gunzip. Hat's da vielleicht Probleme mit?
Keine gzip-Unterstützung im Client, also auch keine gzip-Kodierung des Datenstroms...

HTTP::Message
more (1.2kb):

Code: (dl )
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
sub decodable
{
# should match the Content-Encoding values that decoded_content can deal with
my $self = shift;
my @enc;
# XXX preferably we should determine if the modules are available without loading
# them here
eval {
require IO::Uncompress::Gunzip;
push(@enc, "gzip", "x-gzip");
};
eval {
require IO::Uncompress::Inflate;
require IO::Uncompress::RawInflate;
push(@enc, "deflate");
};
eval {
require IO::Uncompress::Bunzip2;
push(@enc, "x-bzip2");
};
# we don't care about announcing the 'identity', 'base64' and
# 'quoted-printable' stuff
return wantarray ? @enc : join(", ", @enc);
}

meine Beiträge: I.d.R. alle Angaben ohne Gewähr und auf Linux abgestimmt!
Die Sprache heisst Perl, nicht PERL. - Bitte Crossposts als solche kenntlich machen!

View full thread LWP::UserAgent: unterschiedliche Content-Encoding bei Response