r76995 - in /trunk/libhttp-proxy-perl: ./ debian/ lib/HTTP/ lib/HTTP/Proxy/BodyFilter/ lib/HTTP/Proxy/Engine/ t/
carnil at users.alioth.debian.org
carnil at users.alioth.debian.org
Sun Jul 3 11:50:20 UTC 2011
Author: carnil
Date: Sun Jul 3 11:50:19 2011
New Revision: 76995
URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=76995
Log:
* Team upload.
* New upstream release
Added:
trunk/libhttp-proxy-perl/lib/HTTP/Proxy/Engine/Threaded.pm
- copied unchanged from r76994, branches/upstream/libhttp-proxy-perl/current/lib/HTTP/Proxy/Engine/Threaded.pm
Modified:
trunk/libhttp-proxy-perl/Changes
trunk/libhttp-proxy-perl/MANIFEST
trunk/libhttp-proxy-perl/META.yml
trunk/libhttp-proxy-perl/debian/changelog
trunk/libhttp-proxy-perl/lib/HTTP/Proxy.pm
trunk/libhttp-proxy-perl/lib/HTTP/Proxy/BodyFilter/save.pm
trunk/libhttp-proxy-perl/lib/HTTP/Proxy/Engine/Legacy.pm
trunk/libhttp-proxy-perl/lib/HTTP/Proxy/Engine/ScoreBoard.pm
trunk/libhttp-proxy-perl/t/00basic.t
trunk/libhttp-proxy-perl/t/90diveintomark.t
Modified: trunk/libhttp-proxy-perl/Changes
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libhttp-proxy-perl/Changes?rev=76995&op=diff
==============================================================================
--- trunk/libhttp-proxy-perl/Changes (original)
+++ trunk/libhttp-proxy-perl/Changes Sun Jul 3 11:50:19 2011
@@ -1,4 +1,11 @@
Revision history for Perl extension HTTP::Proxy
+
+0.25 Sun Jul 3 00:28:10 CEST 2011
+ [ENHANCEMENTS]
+ - new Engine: HTTP::Proxy::Engine::Threaded, by Angelos Karageorgiou
+ [FIXES]
+ - Correctly call eod() when the response has no body
+ (closed RT ticket #48310)
0.24 Tue Jul 21 21:28:02 CEST 2009
[ENHANCEMENTS]
Modified: trunk/libhttp-proxy-perl/MANIFEST
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libhttp-proxy-perl/MANIFEST?rev=76995&op=diff
==============================================================================
--- trunk/libhttp-proxy-perl/MANIFEST (original)
+++ trunk/libhttp-proxy-perl/MANIFEST Sun Jul 3 11:50:19 2011
@@ -39,6 +39,7 @@
lib/HTTP/Proxy/Engine/Legacy.pm
lib/HTTP/Proxy/Engine/NoFork.pm
lib/HTTP/Proxy/Engine/ScoreBoard.pm
+lib/HTTP/Proxy/Engine/Threaded.pm
lib/HTTP/Proxy/FilterStack.pm
lib/HTTP/Proxy/HeaderFilter.pm
lib/HTTP/Proxy/HeaderFilter/simple.pm
Modified: trunk/libhttp-proxy-perl/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libhttp-proxy-perl/META.yml?rev=76995&op=diff
==============================================================================
--- trunk/libhttp-proxy-perl/META.yml (original)
+++ trunk/libhttp-proxy-perl/META.yml Sun Jul 3 11:50:19 2011
@@ -1,20 +1,19 @@
---
+abstract: 'A pure Perl HTTP proxy'
+author:
+ - "Philippe \"BooK\" Bruhat <book at cpan.org>"
+configure_requires:
+ Module::Build: 0.36
+generated_by: 'Module::Build version 0.3607'
+license: perl
+meta-spec:
+ url: http://module-build.sourceforge.net/META-spec-v1.4.html
+ version: 1.4
name: HTTP-Proxy
-version: 0.24
-author:
- - 'Philippe "BooK" Bruhat <book at cpan.org>'
-abstract: A pure Perl HTTP proxy
-license: perl
-resources:
- license: http://dev.perl.org/licenses/
-requires:
- HTTP::Daemon: 1.25
- LWP::UserAgent: 2
- Test::More: 0
provides:
HTTP::Proxy:
file: lib/HTTP/Proxy.pm
- version: 0.24
+ version: 0.25
HTTP::Proxy::BodyFilter:
file: lib/HTTP/Proxy/BodyFilter.pm
HTTP::Proxy::BodyFilter::complete:
@@ -39,6 +38,8 @@
file: lib/HTTP/Proxy/Engine/NoFork.pm
HTTP::Proxy::Engine::ScoreBoard:
file: lib/HTTP/Proxy/Engine/ScoreBoard.pm
+ HTTP::Proxy::Engine::Threaded:
+ file: lib/HTTP/Proxy/Engine/Threaded.pm
HTTP::Proxy::FilterStack:
file: lib/HTTP/Proxy/FilterStack.pm
HTTP::Proxy::HeaderFilter:
@@ -47,7 +48,10 @@
file: lib/HTTP/Proxy/HeaderFilter/simple.pm
HTTP::Proxy::HeaderFilter::standard:
file: lib/HTTP/Proxy/HeaderFilter/standard.pm
-generated_by: Module::Build version 0.280801
-meta-spec:
- url: http://module-build.sourceforge.net/META-spec-v1.2.html
- version: 1.2
+requires:
+ HTTP::Daemon: 1.25
+ LWP::UserAgent: 2
+ Test::More: 0
+resources:
+ license: http://dev.perl.org/licenses/
+version: 0.25
Modified: trunk/libhttp-proxy-perl/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libhttp-proxy-perl/debian/changelog?rev=76995&op=diff
==============================================================================
--- trunk/libhttp-proxy-perl/debian/changelog (original)
+++ trunk/libhttp-proxy-perl/debian/changelog Sun Jul 3 11:50:19 2011
@@ -1,3 +1,10 @@
+libhttp-proxy-perl (0.25-1) UNRELEASED; urgency=low
+
+ * Team upload.
+ * New upstream release
+
+ -- Salvatore Bonaccorso <carnil at debian.org> Sun, 03 Jul 2011 13:49:33 +0200
+
libhttp-proxy-perl (0.24-3) unstable; urgency=low
* Add a patch to work around a failure in the pod-coverage test under perl
Modified: trunk/libhttp-proxy-perl/lib/HTTP/Proxy.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libhttp-proxy-perl/lib/HTTP/Proxy.pm?rev=76995&op=diff
==============================================================================
--- trunk/libhttp-proxy-perl/lib/HTTP/Proxy.pm (original)
+++ trunk/libhttp-proxy-perl/lib/HTTP/Proxy.pm Sun Jul 3 11:50:19 2011
@@ -20,7 +20,7 @@
DATA CONNECT ENGINE ALL );
%EXPORT_TAGS = ( log => [@EXPORT_OK] ); # only one tag
-$VERSION = '0.24';
+$VERSION = '0.25';
my $CRLF = "\015\012"; # "\r\n" is not portable
@@ -422,6 +422,16 @@
# remove the header added by LWP::UA before it sends the response back
$response->remove_header('Client-Date');
+ # the callback is not called by LWP::UA->request
+ # in some cases (HEAD, redirect, error responses have no body)
+ if ( !$sent ) {
+ $self->response($response);
+ $self->{$_}{response}->select_filters( $response )
+ for qw( headers body );
+ $self->{headers}{response}
+ ->filter( $response->headers, $response );
+ }
+
# do a last pass, in case there was something left in the buffers
my $data = ""; # FIXME $protocol is undef here too
$self->{body}{response}->filter_last( \$data, $response, undef );
@@ -435,16 +445,6 @@
# last chunk
print $conn "0$CRLF$CRLF" if $chunked; # no trailers either
$self->response($response);
-
- # the callback is not called by LWP::UA->request
- # in some case (HEAD, error)
- if ( !$sent ) {
- $self->response($response);
- $self->{$_}{response}->select_filters( $response )
- for qw( headers body );
- $self->{headers}{response}
- ->filter( $response->headers, $response );
- }
# what about X-Died and X-Content-Range?
if( my $died = $response->header('X-Died') ) {
@@ -921,10 +921,10 @@
$proxy->push_filter(
mime => undef,
request => HTTP::Proxy::HeaderFilter::simple->new(
- sub { $_[0]->remove_header(qw( User-Agent From Referer Cookie )) },
+ sub { $_[1]->remove_header(qw( User-Agent From Referer Cookie )) },
),
response => HTTP::Proxy::HeaderFilter::simple->new(
- sub { $_[0]->remove_header(qw( Set-Cookie )); },
+ sub { $_[1]->remove_header(qw( Set-Cookie )); },
)
);
Modified: trunk/libhttp-proxy-perl/lib/HTTP/Proxy/BodyFilter/save.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libhttp-proxy-perl/lib/HTTP/Proxy/BodyFilter/save.pm?rev=76995&op=diff
==============================================================================
--- trunk/libhttp-proxy-perl/lib/HTTP/Proxy/BodyFilter/save.pm (original)
+++ trunk/libhttp-proxy-perl/lib/HTTP/Proxy/BodyFilter/save.pm Sun Jul 3 11:50:19 2011
@@ -285,14 +285,14 @@
and C<prefix>) are ignored.
The C<filename> option expects a reference to a subroutine. The subroutine
-will receive the HTTP::Message object and must return a string which
+will receive the C<HTTP::Message> object and must return a string which
is the path of the file to be created (an absolute path is recommended,
but a relative path is accepted).
Returning C<""> or C<undef> will prevent the creation of the file.
This lets a filter decide even more precisely what to save or not,
even though this should be done in the match subroutine (see
-HTTP::Proxy's C<pushè_filte()> method).
+HTTP::Proxy's C<push_filter()> method).
=back
Modified: trunk/libhttp-proxy-perl/lib/HTTP/Proxy/Engine/Legacy.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libhttp-proxy-perl/lib/HTTP/Proxy/Engine/Legacy.pm?rev=76995&op=diff
==============================================================================
--- trunk/libhttp-proxy-perl/lib/HTTP/Proxy/Engine/Legacy.pm (original)
+++ trunk/libhttp-proxy-perl/lib/HTTP/Proxy/Engine/Legacy.pm Sun Jul 3 11:50:19 2011
@@ -114,11 +114,23 @@
This engine reproduces the older child creation algorithm of HTTP::Proxy.
+Angelos Karageorgiou C<< <angelos at unix.gr> >> reports:
+
+I<I got the Legacy engine to work really fast under C<Win32> with the following trick:>
+
+ max_keep_alive_requests(1);
+ max_clients(120);
+ $HTTP::VERSION(1.0); # just in case
+
+I<and it smokes.>
+
+I<It seems that forked children are really slow when calling select for handling C<keep-alive>d requests!>
+
=head1 METHODS
The module defines the following methods, used by HTTP::Proxy main loop:
-=over
+=over 4
=item start()
Modified: trunk/libhttp-proxy-perl/lib/HTTP/Proxy/Engine/ScoreBoard.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libhttp-proxy-perl/lib/HTTP/Proxy/Engine/ScoreBoard.pm?rev=76995&op=diff
==============================================================================
--- trunk/libhttp-proxy-perl/lib/HTTP/Proxy/Engine/ScoreBoard.pm (original)
+++ trunk/libhttp-proxy-perl/lib/HTTP/Proxy/Engine/ScoreBoard.pm Sun Jul 3 11:50:19 2011
@@ -232,7 +232,7 @@
=head1 SYNOPSIS
- my $proxy = HTTP::Proxy->new( engine => ScoreBoard );
+ my $proxy = HTTP::Proxy->new( engine => 'ScoreBoard' );
=head1 DESCRIPTION
@@ -242,7 +242,7 @@
The module defines the following methods, used by HTTP::Proxy main loop:
-=over
+=over 4
=item start()
Modified: trunk/libhttp-proxy-perl/t/00basic.t
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libhttp-proxy-perl/t/00basic.t?rev=76995&op=diff
==============================================================================
--- trunk/libhttp-proxy-perl/t/00basic.t (original)
+++ trunk/libhttp-proxy-perl/t/00basic.t Sun Jul 3 11:50:19 2011
@@ -1,6 +1,7 @@
use vars qw( @modules );
BEGIN {
+ use Config;
use File::Find;
use vars qw( @modules );
@@ -9,5 +10,12 @@
use Test::More tests => scalar @modules;
-use_ok($_) for sort map { s!/!::!g; s/\.pm$//; s/^blib::lib:://; $_ } @modules;
+for ( sort map { s!/!::!g; s/\.pm$//; s/^blib::lib:://; $_ } @modules ) {
+SKIP:
+ {
+ skip "$^X is not a threaded Perl", 1
+ if /Thread/ && !$Config{usethreads};
+ use_ok($_);
+ }
+}
Modified: trunk/libhttp-proxy-perl/t/90diveintomark.t
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libhttp-proxy-perl/t/90diveintomark.t?rev=76995&op=diff
==============================================================================
--- trunk/libhttp-proxy-perl/t/90diveintomark.t (original)
+++ trunk/libhttp-proxy-perl/t/90diveintomark.t Sun Jul 3 11:50:19 2011
@@ -30,12 +30,15 @@
$tests += @$_ - 1 for @url;
}
-use Test::More tests => $tests;
+use Test::More;
use HTTP::Proxy;
use HTTP::Request::Common;
use t::Utils;
my $base = 'http://diveintomark.org/tests/client/http';
+
+plan skip_all => "$base seems to have stopped working";
+plan tests => $tests;
SKIP:
{
More information about the Pkg-perl-cvs-commits
mailing list