r23212 - in /trunk/libpoe-component-client-http-perl: CHANGES META.yml debian/changelog debian/control debian/rules lib/POE/Component/Client/HTTP.pm t/57_joel_immed_cancel.t t/58_joel_cancel_multi.t

ghostbar-guest at users.alioth.debian.org ghostbar-guest at users.alioth.debian.org
Tue Jul 15 02:36:48 UTC 2008


Author: ghostbar-guest
Date: Tue Jul 15 02:36:44 2008
New Revision: 23212

URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=23212
Log:
* New upstream release
* debian/rules: Re-enabled tests at build-time. Leaved out the ones requiring internet connection.
* debian/control: 
 + Added build-depends for tests: libwww-perl, libpoe-perl, libpoe-component-client-keepalive-perl, libtest-pod-coverage-perl and libtest-pod-perl.
 + Bumped to Standards-Version 3.8.0 wo/ any changed.
 + Added me as uploader.

Modified:
    trunk/libpoe-component-client-http-perl/CHANGES
    trunk/libpoe-component-client-http-perl/META.yml
    trunk/libpoe-component-client-http-perl/debian/changelog
    trunk/libpoe-component-client-http-perl/debian/control
    trunk/libpoe-component-client-http-perl/debian/rules
    trunk/libpoe-component-client-http-perl/lib/POE/Component/Client/HTTP.pm
    trunk/libpoe-component-client-http-perl/t/57_joel_immed_cancel.t
    trunk/libpoe-component-client-http-perl/t/58_joel_cancel_multi.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=23212&op=diff
==============================================================================
--- trunk/libpoe-component-client-http-perl/CHANGES (original)
+++ trunk/libpoe-component-client-http-perl/CHANGES Tue Jul 15 02:36:44 2008
@@ -1,6 +1,38 @@
-======================================
-9999-99-99 99:99:99.999999Z (untagged)
-======================================
+=================================
+2008-07-13T08:07:37.418057Z v0_85
+=================================
+
+  2008-07-13 08:07:22 (r334) by rcaputo
+  lib/POE/Component/Client/HTTP.pm M
+
+    Time for another release.
+
+  2008-07-13 06:26:14 (r333) by rcaputo
+  lib/POE/Component/Client/HTTP.pm M; t/57_joel_immed_cancel.t M;
+  t/58_joel_cancel_multi.t M
+
+    Don't die when canceling requests or shutting down components. 
+
+  2008-07-09 19:44:56 (r332) by martijn; t/04_chunk_filter.t M
+
+    forget about reading from DATA. This way we can control how much data
+    we feed to the filter, so we get better coverage. 
+
+  2008-07-09 19:44:41 (r331) by martijn; t/04_chunk_filter.t M
+
+    de-poe-ify 04_chunk_filter.t too. 
+
+  2008-07-09 19:44:21 (r330) by martijn; t/03_head_filter.t M
+
+    get coverage up to same level as with the old tests. 
+
+  2008-07-09 19:44:07 (r329) by martijn; t/03_head_filter.t M
+
+    stop using POE while testing Filter::HTTPHead. 
+
+=================================
+2008-05-28T17:35:59.670622Z v0_84
+=================================
 
   2008-05-28 17:33:06 (r327) by rcaputo
   lib/POE/Component/Client/HTTP.pm M; t/14_gzipped_content.t M;

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=23212&op=diff
==============================================================================
--- trunk/libpoe-component-client-http-perl/META.yml (original)
+++ trunk/libpoe-component-client-http-perl/META.yml Tue Jul 15 02:36:44 2008
@@ -1,9 +1,11 @@
 --- #YAML:1.0
 name:                POE-Component-Client-HTTP
-version:             0.84
+version:             0.85
 abstract:            Non-blocking/concurrent HTTP queries with POE
 license:             perl
-generated_by:        ExtUtils::MakeMaker version 6.31
+author:              
+    - Rocco Caputo <rcaputo at cpan.org>
+generated_by:        ExtUtils::MakeMaker version 6.44
 distribution_type:   module
 requires:     
     HTTP::Request:                 1.3
@@ -13,7 +15,5 @@
     POE::Component::Client::Keepalive: 0.1001
     URI:                           1.24
 meta-spec:
-    url:     http://module-build.sourceforge.net/META-spec-v1.2.html
-    version: 1.2
-author:
-    - Rocco Caputo <rcaputo at cpan.org>
+    url:     http://module-build.sourceforge.net/META-spec-v1.3.html
+    version: 1.3

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=23212&op=diff
==============================================================================
--- trunk/libpoe-component-client-http-perl/debian/changelog (original)
+++ trunk/libpoe-component-client-http-perl/debian/changelog Tue Jul 15 02:36:44 2008
@@ -1,3 +1,16 @@
+libpoe-component-client-http-perl (0.85-1) unstable; urgency=low
+
+  * New upstream release
+  * debian/rules:
+   + Re-enabled tests, left out the ones that required internet connection.
+  * debian/control:
+   + Added libwww-perl, libpoe-perl, libpoe-component-client-keepalive-perl,
+   libtest-pod-coverage-perl and libtest-pod-perl as B-P in order to build tests.
+   + Bumped to 3.8.0 Standards-Version, no changes needed.
+   + Added me as uploader.
+
+ -- Jose Luis Rivas <ghostbar38 at gmail.com>  Mon, 14 Jul 2008 22:02:17 -0430
+
 libpoe-component-client-http-perl (0.84-1) unstable; urgency=low
 
   * Fixed typo in debian/copyright.

Modified: trunk/libpoe-component-client-http-perl/debian/control
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libpoe-component-client-http-perl/debian/control?rev=23212&op=diff
==============================================================================
--- trunk/libpoe-component-client-http-perl/debian/control (original)
+++ trunk/libpoe-component-client-http-perl/debian/control Tue Jul 15 02:36:44 2008
@@ -2,11 +2,12 @@
 Section: perl
 Priority: optional
 Build-Depends: debhelper (>= 5), quilt
-Build-Depends-Indep: perl
+Build-Depends-Indep: perl, libwww-perl, libpoe-perl (>= 0.3202), libpoe-component-client-keepalive-perl (>= 0.1001), libtest-pod-perl, libtest-pod-coverage-perl
 Maintainer: Debian Perl Group <pkg-perl-maintainers at lists.alioth.debian.org>
 Uploaders: Martín Ferrari <tincho at debian.org>,
- gregor herrmann <gregoa at debian.org>
-Standards-Version: 3.7.3
+ gregor herrmann <gregoa at debian.org>,
+ Jose Luis Rivas <ghostbar38 at gmail.com>
+Standards-Version: 3.8.0
 Homepage: http://search.cpan.org/dist/POE-Component-Client-HTTP/
 Vcs-Svn: svn://svn.debian.org/pkg-perl/trunk/libpoe-component-client-http-perl/
 Vcs-Browser: http://svn.debian.org/wsvn/pkg-perl/trunk/libpoe-component-client-http-perl/

Modified: trunk/libpoe-component-client-http-perl/debian/rules
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libpoe-component-client-http-perl/debian/rules?rev=23212&op=diff
==============================================================================
--- trunk/libpoe-component-client-http-perl/debian/rules (original)
+++ trunk/libpoe-component-client-http-perl/debian/rules Tue Jul 15 02:36:44 2008
@@ -17,9 +17,7 @@
 	dh_testdir
 	$(PERL) Makefile.PL INSTALLDIRS=vendor
 	$(MAKE)
-	# do not run tests; almost all of them requires internet access
-	# during build
-	#$(MAKE) test
+	$(MAKE) test TEST_FILES="t/03_head_filter.t t/04_chunk_filter.t t/05_request.t t/06_factory.t t/07_proxy.t t/08_discard.t t/12_pod.t t/13_pod_coverage.t t/14_gzipped_content.t t/51_santos_status.t t/52_reiss_bad_length.t t/53_response_parser.t t/55_reiss_double_resp.t t/56_redirect_excess.t"
 	touch $@
 
 clean: unpatch

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=23212&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 Tue Jul 15 02:36:44 2008
@@ -1,4 +1,4 @@
-# $Id: HTTP.pm 327 2008-05-28 17:33:06Z rcaputo $
+# $Id: HTTP.pm 334 2008-07-13 08:07:22Z rcaputo $
 
 package POE::Component::Client::HTTP;
 
@@ -11,7 +11,7 @@
 use constant DEBUG_DATA => 0;
 
 use vars qw($VERSION);
-$VERSION = '0.84';
+$VERSION = '0.85';
 
 use Carp qw(croak);
 use HTTP::Response;
@@ -274,20 +274,20 @@
 
   my $cm_req_id;
   eval {
-      # get a connection from Client::Keepalive
-      $request->[REQ_CONN_ID] = $heap->{cm}->allocate(
-        scheme  => $request->scheme,
-        addr    => $request->host,
-        port    => $request->port,
-        context => $request->ID,
-        event   => 'got_connect_done',
-        @timeout,
-      );
+    # get a connection from Client::Keepalive
+    $request->[REQ_CONN_ID] = $heap->{cm}->allocate(
+      scheme  => $request->scheme,
+      addr    => $request->host,
+      port    => $request->port,
+      context => $request->ID,
+      event   => 'got_connect_done',
+      @timeout,
+    );
   };
   if ($@) {
-      delete $heap->{request}->{$request->ID};
-      # we can reach here for things like host being invalid.
-      $request->error(400, $@);
+    delete $heap->{request}->{$request->ID};
+    # we can reach here for things like host being invalid.
+    $request->error(400, $@);
   }
 }
 
@@ -302,10 +302,24 @@
   my $connection = $response->{'connection'};
   my $request_id = $response->{'context'};
 
+  # Can't handle connections if we're shut down.
+  # TODO - How do we still get these?  Were they previously queued or
+  # something?
+  if ($heap->{is_shut_down}) {
+    _internal_cancel(
+      $heap, $request_id, 408, "Request timed out (request canceled)"
+    );
+    return;
+  }
+
   if (defined $connection) {
     DEBUG and warn "CON: request $request_id connected ok...";
 
     my $request = $heap->{request}->{$request_id};
+    unless (defined $request) {
+      DEBUG and warn "CON: ignoring connection for canceled request";
+      return;
+    }
 
     my $block_size = $heap->{factory}->block_size;
 
@@ -466,8 +480,9 @@
   my ($kernel, $heap, $operation, $errnum, $errstr, $wheel_id) =
     @_[KERNEL, HEAP, ARG0..ARG3];
 
-  DEBUG and
-    warn "I/O: wheel $wheel_id encountered $operation error $errnum: $errstr";
+  DEBUG and warn(
+    "I/O: wheel $wheel_id encountered $operation error $errnum: $errstr"
+  );
 
   # Drop the wheel.
   my $request_id = delete $heap->{wheel_to_request}->{$wheel_id};
@@ -544,7 +559,7 @@
     # not acceptable according to the accept headers sent in the
     # request.
 
-    $request->error (406, "Response larger than MaxSize - $request_id");
+    $request->error(406, "Response larger than MaxSize - $request_id");
   }
 }
 
@@ -895,12 +910,12 @@
   my $request = delete $heap->{request}{$request_id};
   return unless defined $request;
 
-  DEBUG and warn "SHT: Shutdown is canceling request $request_id";
+  DEBUG and warn "CXL: canceling request $request_id";
   $request->remove_timeout();
 
   if (my $wheel = $request->wheel) {
     my $wheel_id = $wheel->ID;
-    DEBUG and warn "SHT: Request $request_id canceling wheel $wheel_id";
+    DEBUG and warn "CXL: Request $request_id canceling wheel $wheel_id";
     delete $heap->{wheel_to_request}{$wheel_id};
     delete $heap->{request_to_id}{$request->[REQ_REQUEST]};
     $wheel = undef;
@@ -917,7 +932,7 @@
   }
 
   unless ($request->[REQ_STATE] & RS_POSTED) {
-    $request->error(408, "Request timed out (component shut down)");
+    $request->error($code, $message);
   }
 }
 
@@ -936,7 +951,7 @@
 
   # Shut down the connection manager subcomponent.
   if (defined $heap->{cm}) {
-    DEBUG and warn "SHT: Client::HTTP shutting down Client::Keepalive";
+    DEBUG and warn "CXL: Client::HTTP shutting down Client::Keepalive";
     $heap->{cm}->shutdown();
     delete $heap->{cm};
   }

Modified: trunk/libpoe-component-client-http-perl/t/57_joel_immed_cancel.t
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libpoe-component-client-http-perl/t/57_joel_immed_cancel.t?rev=23212&op=diff
==============================================================================
--- trunk/libpoe-component-client-http-perl/t/57_joel_immed_cancel.t (original)
+++ trunk/libpoe-component-client-http-perl/t/57_joel_immed_cancel.t Tue Jul 15 02:36:44 2008
@@ -1,5 +1,5 @@
 #!perl
-# $Id: 57_joel_immed_cancel.t 272 2006-09-25 17:13:25Z rcaputo $
+# $Id: 57_joel_immed_cancel.t 333 2008-07-13 06:26:14Z rcaputo $
 
 use strict;
 use warnings;
@@ -31,4 +31,5 @@
 sub response_handler {
   my $response = $_[ARG1][0];
   is( $response->code, 408, "timeout on a canceled request" );
+  $_[KERNEL]->post( ua => "shutdown" );
 }

Modified: trunk/libpoe-component-client-http-perl/t/58_joel_cancel_multi.t
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libpoe-component-client-http-perl/t/58_joel_cancel_multi.t?rev=23212&op=diff
==============================================================================
--- trunk/libpoe-component-client-http-perl/t/58_joel_cancel_multi.t (original)
+++ trunk/libpoe-component-client-http-perl/t/58_joel_cancel_multi.t Tue Jul 15 02:36:44 2008
@@ -58,25 +58,24 @@
 sub client_start{
   my $request = HTTP::Request->new('GET', "http://www.google.com/");
   ok(
-	$_[KERNEL]->post( ua => request => response => $request ),
-	"post 1st req succeeds"
+  $_[KERNEL]->post( ua => request => response => $request ),
+  "post 1st req succeeds"
   );
 
   my $req2 = HTTP::Request->new('GET', "http://www.google.com/");
   ok(
     $_[KERNEL]->post( ua => request => response => $req2 ),
-	"post 2nd req succeeds"
+  "post 2nd req succeeds"
   );
 
   my $req3 = HTTP::Request->new('GET', "http://poe.perl.org/");
   ok (
     $_[KERNEL]->post( ua => request => response => $req3 ),
-	"post 3rd req succeeds"
+  "post 3rd req succeeds"
   );
-	
+
 
   ok( $_[KERNEL]->post( ua => cancel => $request ), "cancel 1st req succeeds" );
-
 }
 
 




More information about the Pkg-perl-cvs-commits mailing list