r20767 - in /trunk/libpoe-component-client-http-perl: CHANGES MANIFEST META.yml debian/changelog lib/POE/Component/Client/HTTP.pm lib/POE/Component/Client/HTTP/Request.pm t/14_gzipped_content.t t/59_andy_one_keepalive.t
tincho at users.alioth.debian.org
tincho at users.alioth.debian.org
Fri Jun 6 11:35:37 UTC 2008
Author: tincho
Date: Fri Jun 6 11:35:37 2008
New Revision: 20767
URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=20767
Log:
New upstream release.
Added:
trunk/libpoe-component-client-http-perl/t/59_andy_one_keepalive.t
- copied unchanged from r20765, branches/upstream/libpoe-component-client-http-perl/current/t/59_andy_one_keepalive.t
Modified:
trunk/libpoe-component-client-http-perl/CHANGES
trunk/libpoe-component-client-http-perl/MANIFEST
trunk/libpoe-component-client-http-perl/META.yml
trunk/libpoe-component-client-http-perl/debian/changelog
trunk/libpoe-component-client-http-perl/lib/POE/Component/Client/HTTP.pm
trunk/libpoe-component-client-http-perl/lib/POE/Component/Client/HTTP/Request.pm
trunk/libpoe-component-client-http-perl/t/14_gzipped_content.t
Modified: trunk/libpoe-component-client-http-perl/CHANGES
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libpoe-component-client-http-perl/CHANGES?rev=20767&op=diff
==============================================================================
--- trunk/libpoe-component-client-http-perl/CHANGES (original)
+++ trunk/libpoe-component-client-http-perl/CHANGES Fri Jun 6 11:35:37 2008
@@ -1,3 +1,27 @@
+======================================
+9999-99-99 99:99:99.999999Z (untagged)
+======================================
+
+ 2008-05-28 17:33:06 (r327) by rcaputo
+ lib/POE/Component/Client/HTTP.pm M; t/14_gzipped_content.t M;
+ lib/POE/Component/Client/HTTP/Request.pm M
+
+ Resolve Content-Encoding issue surfaced by recent changes to
+ HTTP::Response. Applies the fix recommeded by Yuri Karaban in
+ rt.cpan.org ticket 35538.
+
+ 2008-05-04 06:57:15 (r326) by rcaputo
+ lib/POE/Component/Client/HTTP/Request.pm M
+
+ Resolve character encoding issues arising from a change in
+ HTTP::Message's decoded_content() behavior. Tentatively resolves
+ rt.cpan.org ticket 35538, reported by Yuri Karaban, with additional
+ commentary and a test case by "OverlordQ".
+
+ 2008-04-20 00:34:15 (r325) by rcaputo; MANIFEST M
+
+ Add t/59_andy_one_keepalive.t
+
=================================
2008-04-20T00:30:17.408340Z v0_83
=================================
Modified: trunk/libpoe-component-client-http-perl/MANIFEST
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libpoe-component-client-http-perl/MANIFEST?rev=20767&op=diff
==============================================================================
--- trunk/libpoe-component-client-http-perl/MANIFEST (original)
+++ trunk/libpoe-component-client-http-perl/MANIFEST Fri Jun 6 11:35:37 2008
@@ -1,4 +1,4 @@
-# $Id: MANIFEST 294 2006-10-25 06:55:14Z rcaputo $
+# $Id: MANIFEST 325 2008-04-20 00:34:15Z rcaputo $
CHANGES
CHANGES.OLD
MANIFEST
@@ -34,3 +34,4 @@
t/56_redirect_excess.t
t/57_joel_immed_cancel.t
t/58_joel_cancel_multi.t
+t/59_andy_one_keepalive.t
Modified: trunk/libpoe-component-client-http-perl/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libpoe-component-client-http-perl/META.yml?rev=20767&op=diff
==============================================================================
--- trunk/libpoe-component-client-http-perl/META.yml (original)
+++ trunk/libpoe-component-client-http-perl/META.yml Fri Jun 6 11:35:37 2008
@@ -1,6 +1,6 @@
--- #YAML:1.0
name: POE-Component-Client-HTTP
-version: 0.83
+version: 0.84
abstract: Non-blocking/concurrent HTTP queries with POE
license: perl
generated_by: ExtUtils::MakeMaker version 6.31
Modified: trunk/libpoe-component-client-http-perl/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libpoe-component-client-http-perl/debian/changelog?rev=20767&op=diff
==============================================================================
--- trunk/libpoe-component-client-http-perl/debian/changelog (original)
+++ trunk/libpoe-component-client-http-perl/debian/changelog Fri Jun 6 11:35:37 2008
@@ -1,9 +1,10 @@
-libpoe-component-client-http-perl (0.83-3) UNRELEASED; urgency=low
+libpoe-component-client-http-perl (0.84-1) UNRELEASED; urgency=low
* Fixed typo in debian/copyright.
* Updated my email address.
+ * New upstream release.
- -- MartÃn Ferrari <tincho at debian.org> Mon, 12 May 2008 13:25:32 -0300
+ -- MartÃn Ferrari <tincho at debian.org> Fri, 06 Jun 2008 08:32:12 -0300
libpoe-component-client-http-perl (0.83-2) unstable; urgency=low
Modified: trunk/libpoe-component-client-http-perl/lib/POE/Component/Client/HTTP.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libpoe-component-client-http-perl/lib/POE/Component/Client/HTTP.pm?rev=20767&op=diff
==============================================================================
--- trunk/libpoe-component-client-http-perl/lib/POE/Component/Client/HTTP.pm (original)
+++ trunk/libpoe-component-client-http-perl/lib/POE/Component/Client/HTTP.pm Fri Jun 6 11:35:37 2008
@@ -1,4 +1,4 @@
-# $Id: HTTP.pm 323 2008-04-20 00:29:46Z rcaputo $
+# $Id: HTTP.pm 327 2008-05-28 17:33:06Z rcaputo $
package POE::Component::Client::HTTP;
@@ -11,7 +11,7 @@
use constant DEBUG_DATA => 0;
use vars qw($VERSION);
-$VERSION = '0.83';
+$VERSION = '0.84';
use Carp qw(croak);
use HTTP::Response;
@@ -83,11 +83,6 @@
# grep { exists $te_filters{$_} }
# qw(x-bzip2 gzip x-gzip deflate compress chunked identity)
#);
-
-# Set default accept encoding here, but DON'T SET later, if the
-# request is streaming.
-
-my $accept_encoding = Net::HTTP::Methods::zlib_ok() ? 'gzip' : '';
my %supported_schemes = (
http => 1,
@@ -261,17 +256,6 @@
if (defined $proxy_override) {
POE::Component::Client::HTTP::RequestFactory->parse_proxy($proxy_override);
- }
-
- # Add an Accept-Encoding header if streaming is not enabled and the
- # header doesn't already exist.
- if (
- !$heap->{factory}->is_streaming and
- !$heap->{factory}->max_response_size and # or for limited chunk sizes
- !defined($http_request->header('Accept-Encoding')) and
- length($accept_encoding)
- ) {
- $http_request->header('Accept-Encoding', $accept_encoding);
}
my $request = $heap->{factory}->create_request(
@@ -1348,6 +1332,37 @@
$kernel->post( ua => request, 'response', $request );
+=head1 CONTENT ENCODING AND COMPRESSION
+
+Transparent content decoding has been disabled as of version 0.84.
+This also removes support for transparent gzip requesting and
+decompression.
+
+To re-enable gzip compression, specify the gzip Content-Encoding and
+use HTTP::Response's decoded_content() method rather than content():
+
+ my $request = HTTP::Request->new(
+ GET => "http://www.yahoo.com/", [
+ 'Accept-Encoding' => 'gzip'
+ ]
+ );
+
+ # ... time passes ...
+
+ my $content = $response->decoded_content();
+
+The change in POE::Component::Client::HTTP behavior was prompted by
+changes in HTTP::Response that surfaced a bug in the component's
+transparent gzip handling.
+
+Allowing the application to specify and handle content encodings seems
+to be the most reliable and flexible resolution.
+
+For more information about the problem and discussions regarding the
+solution, see:
+L<http://www.perlmonks.org/?node_id=683833> and
+L<http://rt.cpan.org/Ticket/Display.html?id=35538>
+
=head1 ENVIRONMENT
POE::Component::Client::HTTP uses two standard environment variables:
Modified: trunk/libpoe-component-client-http-perl/lib/POE/Component/Client/HTTP/Request.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libpoe-component-client-http-perl/lib/POE/Component/Client/HTTP/Request.pm?rev=20767&op=diff
==============================================================================
--- trunk/libpoe-component-client-http-perl/lib/POE/Component/Client/HTTP/Request.pm (original)
+++ trunk/libpoe-component-client-http-perl/lib/POE/Component/Client/HTTP/Request.pm Fri Jun 6 11:35:37 2008
@@ -1,4 +1,4 @@
-# $Id: Request.pm 318 2008-03-25 07:42:11Z rcaputo $
+# $Id: Request.pm 327 2008-05-28 17:33:06Z rcaputo $
package POE::Component::Client::HTTP::Request;
use strict;
@@ -177,16 +177,6 @@
# if we are. that there's no ARG1 lets the client know we're done
# with the content in the latter case
if ($self->[REQ_STATE] & RS_DONE) {
- DEBUG and warn(
- "checking $response for content-encoding ", $self->[REQ_ID]
- );
- if ($response->header('content-encoding')) {
- my $content;
- # LWP likes to die on error.
- eval { $content = $response->decoded_content };
- if ($content) { $response->content($content); }
- }
-
DEBUG and warn "done; returning $response for ", $self->[REQ_ID];
$self->[REQ_POSTBACK]->($self->[REQ_RESPONSE]);
$self->[REQ_STATE] |= RS_POSTED;
@@ -498,10 +488,10 @@
$http_request->protocol() . "\x0D\x0A" .
$http_request->headers_as_string("\x0D\x0A") . "\x0D\x0A"
);
-
+
if ( !ref $http_request->content() ) {
$request_string .= $http_request->content(); # . "\x0D\x0A"
- }
+ }
DEBUG and do {
my $formatted_request_string = $request_string;
Modified: trunk/libpoe-component-client-http-perl/t/14_gzipped_content.t
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libpoe-component-client-http-perl/t/14_gzipped_content.t?rev=20767&op=diff
==============================================================================
--- trunk/libpoe-component-client-http-perl/t/14_gzipped_content.t (original)
+++ trunk/libpoe-component-client-http-perl/t/14_gzipped_content.t Fri Jun 6 11:35:37 2008
@@ -108,7 +108,7 @@
ok(
$response->code() == 200 &&
- $response->content eq $original_content,
+ $response->decoded_content eq $original_content,
"gzip encoded transfers decode correctly"
);
},
More information about the Pkg-perl-cvs-commits
mailing list