r29133 - in /trunk/libpoe-component-client-http-perl: CHANGES META.yml Makefile.PL debian/changelog lib/POE/Component/Client/HTTP.pm lib/POE/Component/Client/HTTP/Request.pm lib/POE/Component/Client/HTTP/RequestFactory.pm t/01_request.t t/11_cancel.t

gregoa at users.alioth.debian.org gregoa at users.alioth.debian.org
Thu Jan 1 22:14:05 UTC 2009


Author: gregoa
Date: Thu Jan  1 22:14:02 2009
New Revision: 29133

URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=29133
Log:
New upstream release.

Modified:
    trunk/libpoe-component-client-http-perl/CHANGES
    trunk/libpoe-component-client-http-perl/META.yml
    trunk/libpoe-component-client-http-perl/Makefile.PL
    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/lib/POE/Component/Client/HTTP/RequestFactory.pm
    trunk/libpoe-component-client-http-perl/t/01_request.t
    trunk/libpoe-component-client-http-perl/t/11_cancel.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=29133&op=diff
==============================================================================
--- trunk/libpoe-component-client-http-perl/CHANGES (original)
+++ trunk/libpoe-component-client-http-perl/CHANGES Thu Jan  1 22:14:02 2009
@@ -1,3 +1,62 @@
+=================================
+2008-12-09T06:22:46.753700Z v0_87
+=================================
+
+  2008-12-09 06:17:03 (r351) by rcaputo
+  lib/POE/Component/Client/HTTP.pm M; Makefile.PL M
+
+    Time for a new release. Bump the version and fix dependencies.
+
+  2008-12-09 06:10:50 (r350) by rcaputo; t/11_cancel.t M
+
+    Switch a post() to call() to avoid dispatch timing errors that caused
+    some machines to fail this test. I think it's the test's fault for
+    being intolerant, and I'm not entirely sure the fix will work
+    everywhere. 
+
+  2008-12-09 05:44:46 (r349) by rcaputo; t/01_request.t M
+
+    Fix a spurious test failure. Not all systems implement (or even
+    enable) Nagle's algorithm the same way. This change makes
+    t/01_request.t not as susceptible to packet transmission timing.
+    Previously the test would fail of packets were combined (but succeed
+    if, like on my development system, they were sent separately). 
+
+  2008-12-09 05:29:27 (r348) by rcaputo
+  lib/POE/Component/Client/HTTP/RequestFactory.pm M
+
+    Don't set a content length if the content is a reference. The content
+    length would be the reference's stringified length rather than the
+    length of any actual content. In the case of CODE references, content
+    will be generated in chunks anyway. 
+
+  2008-12-08 07:54:03 (r347) by rcaputo
+  lib/POE/Component/Client/HTTP.pm M
+
+    Clean up the leaky ext_request_to_int_id in more places. Apocalypse
+    suggested using the requesting HTTP::Request reference directly as
+    the internal ID rather than mapping it. That bears some
+    investigation. 
+
+  2008-12-08 07:36:19 (r346) by rcaputo
+  lib/POE/Component/Client/HTTP.pm M
+
+    New version. RequestFactory doesn not like underscores in version
+    numbers.
+
+  2008-12-08 07:27:14 (r345) by rcaputo
+  lib/POE/Component/Client/HTTP.pm M
+
+    Internal development release. 
+
+  2008-12-08 07:23:22 (r344) by rcaputo
+  t/01_stream.t M; lib/POE/Component/Client/HTTP.pm M;
+  lib/POE/Component/Client/HTTP/Request.pm M
+
+    Move data cleanup for request_to_id outside wheel check blocks. The
+    ID being cleaned up isn't a wheel's ID. Also renamed the data member
+    for future clarity, as well as REQ_REQUEST (related). 
+
 =================================
 2008-11-24T22:39:07.052333Z v0_86
 =================================

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=29133&op=diff
==============================================================================
--- trunk/libpoe-component-client-http-perl/META.yml (original)
+++ trunk/libpoe-component-client-http-perl/META.yml Thu Jan  1 22:14:02 2009
@@ -1,20 +1,26 @@
 --- #YAML:1.0
-name:                POE-Component-Client-HTTP
-version:             0.86
-abstract:            Non-blocking/concurrent HTTP queries with POE
-license:             perl
-author:              
+name:               POE-Component-Client-HTTP
+version:            0.87
+abstract:           Non-blocking/concurrent HTTP queries with POE
+author:
     - Rocco Caputo <rcaputo at cpan.org>
-generated_by:        ExtUtils::MakeMaker version 6.44
-distribution_type:   module
-requires:     
-    HTTP::Request:                 1.3
-    HTTP::Response:                1.37
-    Net::HTTP::Methods:            0.02
-    POE:                           0.3202
-    POE::Component::Client::Keepalive: 0.22
-    Test::POE::Server::TCP:        0
-    URI:                           1.24
+license:            perl
+distribution_type:  module
+configure_requires:
+    ExtUtils::MakeMaker:  0
+requires:
+    HTTP::Request:        1.3
+    HTTP::Response:       1.37
+    Net::HTTP::Methods:   0.02
+    POE:                  0.3202
+    POE::Component::Client::Keepalive:  0.25
+    Test::POE::Server::TCP:  0
+    URI:                  1.24
+no_index:
+    directory:
+        - t
+        - inc
+generated_by:       ExtUtils::MakeMaker version 6.48
 meta-spec:
-    url:     http://module-build.sourceforge.net/META-spec-v1.3.html
-    version: 1.3
+    url:      http://module-build.sourceforge.net/META-spec-v1.4.html
+    version:  1.4

Modified: trunk/libpoe-component-client-http-perl/Makefile.PL
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libpoe-component-client-http-perl/Makefile.PL?rev=29133&op=diff
==============================================================================
--- trunk/libpoe-component-client-http-perl/Makefile.PL (original)
+++ trunk/libpoe-component-client-http-perl/Makefile.PL Thu Jan  1 22:14:02 2009
@@ -1,5 +1,5 @@
 #!/usr/bin/perl
-# $Id: Makefile.PL 341 2008-11-24 22:32:18Z rcaputo $
+# $Id: Makefile.PL 351 2008-12-09 06:17:03Z rcaputo $
 
 use strict;
 use lib qw(./mylib);
@@ -14,7 +14,7 @@
   'HTTP::Response'     => 1.37,
   'URI'                => 1.24,
   'Net::HTTP::Methods' => 0.02,
-  'POE::Component::Client::Keepalive' => 0.22,
+  'POE::Component::Client::Keepalive' => 0.25,
   'Test::POE::Server::TCP' => 0,
 );
 

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=29133&op=diff
==============================================================================
--- trunk/libpoe-component-client-http-perl/debian/changelog (original)
+++ trunk/libpoe-component-client-http-perl/debian/changelog Thu Jan  1 22:14:02 2009
@@ -1,4 +1,4 @@
-libpoe-component-client-http-perl (0.86-1) UNRELEASED; urgency=low
+libpoe-component-client-http-perl (0.87-1) UNRELEASED; urgency=low
 
   PROBLEM:
   * tests fail, at least on some machines ...

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=29133&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 Thu Jan  1 22:14:02 2009
@@ -1,4 +1,4 @@
-# $Id: HTTP.pm 341 2008-11-24 22:32:18Z rcaputo $
+# $Id: HTTP.pm 351 2008-12-09 06:17:03Z rcaputo $
 
 package POE::Component::Client::HTTP;
 
@@ -11,7 +11,7 @@
 use constant DEBUG_DATA => 0;
 
 use vars qw($VERSION);
-$VERSION = '0.86';
+$VERSION = '0.87';
 
 use Carp qw(croak);
 use HTTP::Response;
@@ -182,6 +182,7 @@
 
   foreach my $request_rec (values %$request) {
     $request_rec->remove_timeout();
+    delete $heap->{ext_request_to_int_id}->{$request_rec->[REQ_HTTP_REQUEST]};
   }
 
   DEBUG and warn "Client::HTTP (alias=$heap->{alias}) stopped.";
@@ -263,7 +264,7 @@
     $proxy_override, $sender
   );
   $heap->{request}->{$request->ID} = $request;
-  $heap->{request_to_id}->{$http_request} = $request->ID;
+  $heap->{ext_request_to_int_id}->{$http_request} = $request->ID;
 
   my @timeout;
   if ($heap->{factory}->timeout()) {
@@ -272,7 +273,6 @@
     );
   }
 
-  my $cm_req_id;
   eval {
     # get a connection from Client::Keepalive
     $request->[REQ_CONN_ID] = $heap->{cm}->allocate(
@@ -286,6 +286,8 @@
   };
   if ($@) {
     delete $heap->{request}->{$request->ID};
+    delete $heap->{ext_request_to_int_id}->{$http_request};
+
     # we can reach here for things like host being invalid.
     $request->error(400, $@);
   }
@@ -361,6 +363,7 @@
     DEBUG and warn "I/O: removing request $request_id";
     my $request = delete $heap->{request}->{$request_id};
     $request->remove_timeout();
+    delete $heap->{ext_request_to_int_id}->{$request->[REQ_HTTP_REQUEST]};
 
     # Post an error response back to the requesting session.
     $request->connect_error("$operation error $errnum: $errstr");
@@ -390,6 +393,7 @@
 
   DEBUG and warn "T/O: request $request_id has timer ", $request->timer;
   $request->remove_timeout();
+  delete $heap->{ext_request_to_int_id}->{$request->[REQ_HTTP_REQUEST]};
 
   # There's a wheel attached to the request.  Shut it down.
   if (defined(my $wheel = $request->wheel())) {
@@ -399,8 +403,8 @@
     # Shut down the connection so it's not reused.
     $wheel->shutdown_input();
     delete $heap->{wheel_to_request}->{$wheel_id};
-    delete $heap->{request_to_id}->{$request->[REQ_REQUEST]};
-  }
+  }
+
 
   DEBUG and do {
     die( "T/O: request $request_id is unexpectedly zero" )
@@ -446,8 +450,8 @@
   my $request = $heap->{request}->{$request_id};
   
   # Read content to send from a callback
-  if ( ref $request->[REQ_REQUEST]->content() eq 'CODE' ) {
-    my $callback = $request->[REQ_REQUEST]->content();
+  if ( ref $request->[REQ_HTTP_REQUEST]->content() eq 'CODE' ) {
+    my $callback = $request->[REQ_HTTP_REQUEST]->content();
 
     my $buf = eval { $callback->() };
 
@@ -492,8 +496,8 @@
 
     DEBUG and warn "I/O: removing request $request_id";
     my $request = delete $heap->{request}->{$request_id};
-    delete $heap->{request_to_id}{$request->[REQ_REQUEST]};
     $request->remove_timeout;
+    delete $heap->{ext_request_to_int_id}{$request->[REQ_HTTP_REQUEST]};
 
     # Otherwise the remote end simply closed.  If we've got a
     # pending response, then post it back to the client.
@@ -537,7 +541,7 @@
           200, 'OK', [ 'Content-Type' => 'text/html' ], $text
         );
         $request->[REQ_RESPONSE]->protocol('HTTP/0.9');
-        $request->[REQ_RESPONSE]->request($request->[REQ_REQUEST]);
+        $request->[REQ_RESPONSE]->request($request->[REQ_HTTP_REQUEST]);
         $request->[REQ_STATE] = RS_DONE;
         $request->return_response;
         return;
@@ -584,7 +588,7 @@
   my $request = $heap->{request}->{$request_id};
   return unless defined $request;
   DEBUG and warn(
-    "REQUEST $request_id is $request <" . $request->[REQ_REQUEST]->uri . ">"
+    "REQUEST $request_id is $request <" . $request->[REQ_HTTP_REQUEST]->uri . ">"
   );
 
   # Reset the timeout if we get data.
@@ -601,9 +605,9 @@
   # part of the content.
   if ($request->[REQ_STATE] & RS_IN_HEAD) {
     if (defined $input) {
-      $input->request ($request->[REQ_REQUEST]);
+      $input->request ($request->[REQ_HTTP_REQUEST]);
       #warn(
-      #  "INPUT for ", $request->[REQ_REQUEST]->uri, " is \n",$input->as_string
+      #  "INPUT for ", $request->[REQ_HTTP_REQUEST]->uri, " is \n",$input->as_string
       #)
     }
     else {
@@ -620,7 +624,7 @@
     #        Make sure we finish even when it isn't one of these,
     #        but there is no content.
     if (
-      $request->[REQ_REQUEST]->method eq 'HEAD'
+      $request->[REQ_HTTP_REQUEST]->method eq 'HEAD'
       or $input->code =~ /^(?:1|[23]04)/
       or (
         defined($input->content_length())
@@ -632,8 +636,8 @@
         delete $heap->{wheel_to_request}->{$wheel_id};
         if (defined $old_request) {
           DEBUG and warn "I/O: removed request $request_id";
-          delete $heap->{request_to_id}{$old_request->[REQ_REQUEST]};
           $old_request->remove_timeout();
+          delete $heap->{ext_request_to_int_id}{$old_request->[REQ_HTTP_REQUEST]};
           $old_request->[REQ_CONNECTION] = undef;
         }
         return;
@@ -654,7 +658,7 @@
         delete $heap->{wheel_to_request}->{$wheel_id};
         if (defined $old_request) {
           DEBUG and warn "I/O: removed request $request_id";
-          delete $heap->{request_to_id}{$old_request->[REQ_REQUEST]};
+          delete $heap->{ext_request_to_int_id}{$old_request->[REQ_HTTP_REQUEST]};
           $old_request->remove_timeout();
           $old_request->[REQ_CONNECTION]->close();
           $old_request->[REQ_CONNECTION] = undef;
@@ -867,9 +871,9 @@
     if (defined $request) {
       DEBUG and warn "I/O: removing request $request_id";
       $request->remove_timeout();
+      delete $heap->{ext_request_to_int_id}{$request->[REQ_HTTP_REQUEST]};
       if (my $wheel = $request->wheel) {
         delete $heap->{wheel_to_request}->{$wheel->ID};
-        delete $heap->{request_to_id}{$request->[REQ_REQUEST]};
       }
     }
   }
@@ -885,9 +889,9 @@
   if (defined $request) {
     DEBUG and warn "I/O: removed request $request_id";
     $request->remove_timeout();
+    delete $heap->{ext_request_to_int_id}{$request->[REQ_HTTP_REQUEST]};
     if (my $wheel = $request->wheel) {
       delete $heap->{wheel_to_request}->{$wheel->ID};
-      delete $heap->{request_to_id}{$request->[REQ_REQUEST]};
     }
   }
 }
@@ -897,7 +901,7 @@
 
 sub _poco_weeble_cancel {
   my ($kernel, $heap, $request) = @_[KERNEL, HEAP, ARG0];
-  my $request_id = $heap->{request_to_id}{$request};
+  my $request_id = $heap->{ext_request_to_int_id}{$request};
   return unless defined $request_id;
   _internal_cancel(
     $heap, $request_id, 408, "Request timed out (request canceled)"
@@ -912,12 +916,12 @@
 
   DEBUG and warn "CXL: canceling request $request_id";
   $request->remove_timeout();
+  delete $heap->{ext_request_to_int_id}{$request->[REQ_HTTP_REQUEST]};
 
   if (my $wheel = $request->wheel) {
     my $wheel_id = $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;
   }
 

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=29133&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 Thu Jan  1 22:14:02 2009
@@ -1,4 +1,4 @@
-# $Id: Request.pm 336 2008-09-03 17:54:09Z martijn $
+# $Id: Request.pm 344 2008-12-08 07:23:22Z rcaputo $
 
 package POE::Component::Client::HTTP::Request;
 use strict;
@@ -27,7 +27,7 @@
 use constant REQ_ID            =>  0;
 use constant REQ_POSTBACK      =>  1;
 use constant REQ_CONNECTION    =>  2;
-use constant REQ_REQUEST       =>  3;
+use constant REQ_HTTP_REQUEST  =>  3;
 use constant REQ_STATE         =>  4;
 use constant REQ_RESPONSE      =>  5;
 use constant REQ_BUFFER        =>  6;
@@ -60,7 +60,7 @@
     if ($tag eq ':fields') {
       foreach my $sub (
         qw(
-          REQ_ID REQ_POSTBACK REQ_CONNECTION REQ_REQUEST REQ_STATE
+          REQ_ID REQ_POSTBACK REQ_CONNECTION REQ_HTTP_REQUEST REQ_STATE
           REQ_RESPONSE REQ_BUFFER REQ_OCTETS_GOT REQ_TIMER
           REQ_PROG_POSTBACK REQ_USING_PROXY REQ_HOST REQ_PORT
           REQ_HISTORY REQ_START_TIME REQ_CONN_ID
@@ -143,7 +143,7 @@
     $request_id,        # REQ_ID
     $postback,          # REQ_POSTBACK
     undef,              # REQ_CONNECTION
-    $http_request,      # REQ_REQUEST
+    $http_request,      # REQ_HTTP_REQUEST
     RS_CONNECT,         # REQ_STATE
     undef,              # REQ_RESPONSE
     '',                 # REQ_BUFFER
@@ -219,7 +219,7 @@
   # however.
 
   if (
-    $self->[REQ_REQUEST]->method() ne "HEAD" and
+    $self->[REQ_HTTP_REQUEST]->method() ne "HEAD" and
     defined $self->[REQ_RESPONSE]->content_length and
     not defined $self->[REQ_RESPONSE]->header("Transfer-Encoding") and
     $self->[REQ_OCTETS_GOT] < $self->[REQ_RESPONSE]->content_length
@@ -448,7 +448,7 @@
     DEBUG and warn "RED: Too much redirection";
   }
   else { # All fine, yield new request and mark this disabled.
-    my $newrequest = $self->[REQ_REQUEST]->clone();
+    my $newrequest = $self->[REQ_HTTP_REQUEST]->clone();
 
     # Sanitize new request per rt #30400.
     # TODO - What other headers are security risks?
@@ -470,7 +470,7 @@
 
   $self->[REQ_STATE] = RS_SENDING;
 
-  my $http_request = $self->[REQ_REQUEST];
+  my $http_request = $self->[REQ_HTTP_REQUEST];
 
   # MEXNIX 2002-06-01: Check for proxy.  Request query is a bit
   # different...
@@ -541,7 +541,7 @@
   );
 
   $r->content ($m);
-  $r->request ($self->[REQ_REQUEST]);
+  $r->request ($self->[REQ_HTTP_REQUEST]);
   $self->[REQ_POSTBACK]->($r);
   $self->[REQ_STATE] |= RS_POSTED;
 }
@@ -564,7 +564,7 @@
 sub scheme {
   my $self = shift;
 
-  $self->[REQ_USING_PROXY] ? 'http' : $self->[REQ_REQUEST]->uri->scheme;
+  $self->[REQ_USING_PROXY] ? 'http' : $self->[REQ_HTTP_REQUEST]->uri->scheme;
 }
 
 sub DESTROY {

Modified: trunk/libpoe-component-client-http-perl/lib/POE/Component/Client/HTTP/RequestFactory.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libpoe-component-client-http-perl/lib/POE/Component/Client/HTTP/RequestFactory.pm?rev=29133&op=diff
==============================================================================
--- trunk/libpoe-component-client-http-perl/lib/POE/Component/Client/HTTP/RequestFactory.pm (original)
+++ trunk/libpoe-component-client-http-perl/lib/POE/Component/Client/HTTP/RequestFactory.pm Thu Jan  1 22:14:02 2009
@@ -1,4 +1,4 @@
-# $Id: RequestFactory.pm 286 2006-10-15 02:56:46Z rcaputo $
+# $Id: RequestFactory.pm 348 2008-12-09 05:29:27Z rcaputo $
 
 package POE::Component::Client::HTTP::RequestFactory;
 use strict;
@@ -242,9 +242,12 @@
   }
 
   # Add a Content-Length header if this request has content but
-  # doesn't have a Content-Length header already.
+  # doesn't have a Content-Length header already.  Also, don't do it
+  # if the content is a reference, as this means we're streaming via
+  # callback.
   if (
     length($http_request->content()) and
+    !ref($http_request->content()) and
     !$http_request->content_length()
   ) {
     use bytes;

Modified: trunk/libpoe-component-client-http-perl/t/01_request.t
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libpoe-component-client-http-perl/t/01_request.t?rev=29133&op=diff
==============================================================================
--- trunk/libpoe-component-client-http-perl/t/01_request.t (original)
+++ trunk/libpoe-component-client-http-perl/t/01_request.t Thu Jan  1 22:14:02 2009
@@ -84,7 +84,7 @@
     @badrequests,
   );
   
-  plan tests => @requests * 2 - @badrequests + 1;
+  plan tests => @requests * 2 - @badrequests;
 }
 
 sub testd_registered {
@@ -109,35 +109,40 @@
 sub testd_client_input {
   my ($kernel, $heap, $id, $input) = @_[KERNEL, HEAP, ARG0, ARG1];
 
-  if ($input =~ /^GET \/test/) {
+  $heap->{input_buffer} .= $input;
+  my $buffer = $heap->{input_buffer};
+
+  if ($buffer =~ /^GET \/test/) {
     pass("got test request");
+    $heap->{input_buffer} = "";
     $heap->{testd}->send_to_client($id, $data);
   }
-  elsif ($input =~ /^GET \/timeout/) {
+  elsif ($buffer =~ /^GET \/timeout/) {
     pass("got test request we will let timeout");
+    $heap->{input_buffer} = "";
     $kernel->delay_add('send_after_timeout', 1.1, $id);
   }
-  elsif ($input =~ /^POST \/post.*field/s) {
+  elsif ($buffer =~ /^POST \/post1.*field.*field/s) {
     pass("got post request with content");
+    $heap->{input_buffer} = "";
     $heap->{testd}->send_to_client($id, $data);
   }
-  elsif ($input =~ /^POST \/post(\d)/) {
-    $heap->{waitforcontent} = $1;
+  elsif ($buffer =~ /^POST \/post(\d)/) {
+    if ($buffer =~ /field.*field/) {
+      pass("got content for post request with callback");
+      $heap->{input_buffer} = "";
+      $heap->{testd}->send_to_client($id, $data);
+    }
   }
-  elsif ($heap->{waitforcontent}-- and $input =~ /field/) {
-    pass("got content for post request with callback");
-    $heap->{testd}->send_to_client($id, $data);
-  }
-  elsif ($input =~ /^GET \/long/) {
+  elsif ($buffer =~ /^GET \/long/) {
     pass("sending too much data as requested");
+    $heap->{input_buffer} = "";
     $heap->{testd}->send_to_client($id, $long);
   }
   else {
     diag("INPUT: $input");
     diag("unexpected test");
   }
-
-  delete $heap->{waitforcontent} unless $heap->{waitforcontent};
 }
 
 sub got_response {

Modified: trunk/libpoe-component-client-http-perl/t/11_cancel.t
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libpoe-component-client-http-perl/t/11_cancel.t?rev=29133&op=diff
==============================================================================
--- trunk/libpoe-component-client-http-perl/t/11_cancel.t (original)
+++ trunk/libpoe-component-client-http-perl/t/11_cancel.t Thu Jan  1 22:14:02 2009
@@ -1,5 +1,5 @@
 #!/usr/bin/perl -w
-# $Id: 11_cancel.t 336 2008-09-03 17:54:09Z martijn $
+# $Id: 11_cancel.t 350 2008-12-09 06:10:50Z rcaputo $
 # vim: filetype=perl
 
 use strict;
@@ -116,7 +116,7 @@
   my ($http_headers, $chunk) = @$response_packet;
 
   DEBUG and do {
-    warn "client got stream request...\n";
+    warn "client got stream response...\n";
 
     my $response_string = $http_headers->as_string();
     $response_string =~ s/^/| /mg;
@@ -136,7 +136,7 @@
       substr($chunk_buffer, 0, MAX_STREAM_CHUNK_SIZE) = "";
       $next_chunk_character++;
     }
-    $_[KERNEL]->post( streamer => cancel => $_[ARG0][0] );
+    $_[KERNEL]->call( streamer => cancel => $_[ARG0][0] );
     return;
   }
 




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