open my $cout, '+>', undef or die;
open my $cerr, '>', undef or die;
my $rdr = { 0 => $r, 1 => $cout, 2 => $cerr };
open my $cout, '+>', undef or die;
open my $cerr, '>', undef or die;
my $rdr = { 0 => $r, 1 => $cout, 2 => $cerr };
seek($cout, 0, SEEK_SET);
is(<$cout>, sha1_hex($str), 'read expected body');
seek($cout, 0, SEEK_SET);
is(<$cout>, sha1_hex($str), 'read expected body');
is($?, 0, 'curl succesful');
IO::Uncompress::Gunzip::gunzip(\$buf => \(my $out));
is($out, "hello world\n");
my $curl_rdr = { 2 => \(my $curl_err = '') };
is($?, 0, 'curl succesful');
IO::Uncompress::Gunzip::gunzip(\$buf => \(my $out));
is($out, "hello world\n");
my $curl_rdr = { 2 => \(my $curl_err = '') };
"$base/psgi-return-compressible"], undef, $curl_rdr);
is($?, 0, 'curl --compressed successful');
is($buf, "goodbye world\n", 'gzipped response as expected');
"$base/psgi-return-compressible"], undef, $curl_rdr);
is($?, 0, 'curl --compressed successful');
is($buf, "goodbye world\n", 'gzipped response as expected');