r34016 - in /trunk/libwww-perl: Changes META.yml debian/changelog debian/control lib/HTTP/Daemon.pm lib/HTTP/Message.pm lib/LWP.pm lib/LWP/Protocol.pm lib/LWP/UserAgent.pm t/base/message.t

ryan52-guest at users.alioth.debian.org ryan52-guest at users.alioth.debian.org
Sat Apr 25 03:31:19 UTC 2009


Author: ryan52-guest
Date: Sat Apr 25 03:31:14 2009
New Revision: 34016

URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=34016
Log:
* New upstream release
* Add myself to Uploaders

Modified:
    trunk/libwww-perl/Changes
    trunk/libwww-perl/META.yml
    trunk/libwww-perl/debian/changelog
    trunk/libwww-perl/debian/control
    trunk/libwww-perl/lib/HTTP/Daemon.pm
    trunk/libwww-perl/lib/HTTP/Message.pm
    trunk/libwww-perl/lib/LWP.pm
    trunk/libwww-perl/lib/LWP/Protocol.pm
    trunk/libwww-perl/lib/LWP/UserAgent.pm
    trunk/libwww-perl/t/base/message.t

Modified: trunk/libwww-perl/Changes
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libwww-perl/Changes?rev=34016&op=diff
==============================================================================
--- trunk/libwww-perl/Changes (original)
+++ trunk/libwww-perl/Changes Sat Apr 25 03:31:14 2009
@@ -1,3 +1,23 @@
+_______________________________________________________________________________
+2009-04-24  Release 5.826
+
+Gisle Aas (2):
+      Avoid returning stale Content-Type header after message parts have been updated
+      Don't let content saved to file be affected by the $\ setting
+
+Graeme Thompson (1):
+      Issues around multipart boundaries [RT#28970]
+
+Mike Schilli (1):
+      Ignore random _proxy env variables, allow only valid schemes
+
+Slaven Rezic (1):
+      README.SSL is not anymore available at the linpro.no URL.
+
+john9art (1):
+      Make LWP::UserAgent constructor honor the default_headers option [RT#16637]
+
+
 _______________________________________________________________________________
 2009-02-16  Release 5.825
 

Modified: trunk/libwww-perl/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libwww-perl/META.yml?rev=34016&op=diff
==============================================================================
--- trunk/libwww-perl/META.yml (original)
+++ trunk/libwww-perl/META.yml Sat Apr 25 03:31:14 2009
@@ -1,6 +1,6 @@
 --- #YAML:1.0
 name:               libwww-perl
-version:            5.825
+version:            5.826
 abstract:           The World-Wide Web library for Perl
 author:
     - Gisle Aas <gisle at activestate.com>

Modified: trunk/libwww-perl/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libwww-perl/debian/changelog?rev=34016&op=diff
==============================================================================
--- trunk/libwww-perl/debian/changelog (original)
+++ trunk/libwww-perl/debian/changelog Sat Apr 25 03:31:14 2009
@@ -1,3 +1,10 @@
+libwww-perl (5.826-1) UNRELEASED; urgency=low
+
+  * New upstream release
+  * Add myself to Uploaders
+
+ -- Ryan Niebur <ryanryan52 at gmail.com>  Fri, 24 Apr 2009 20:31:04 -0700
+
 libwww-perl (5.825-2) unstable; urgency=low
 
   *  refresh patches using "--no-timestamps --no-index -p ab"

Modified: trunk/libwww-perl/debian/control
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libwww-perl/debian/control?rev=34016&op=diff
==============================================================================
--- trunk/libwww-perl/debian/control (original)
+++ trunk/libwww-perl/debian/control Sat Apr 25 03:31:14 2009
@@ -4,7 +4,8 @@
 Maintainer: Debian Perl Group <pkg-perl-maintainers at lists.alioth.debian.org>
 Uploaders: Jay Bonci <jaybonci at debian.org>, Damyan Ivanov <dmn at debian.org>,
  Jaldhar H. Vyas <jaldhar at debian.org>, gregor herrmann <gregoa at debian.org>,
- Krzysztof Krzyżaniak (eloy) <eloy at debian.org>, Antonio Radici <antonio at dyne.org>
+ Krzysztof Krzyżaniak (eloy) <eloy at debian.org>, Antonio Radici <antonio at dyne.org>,
+ Ryan Niebur <ryanryan52 at gmail.com>
 Standards-Version: 3.8.1
 Homepage: http://search.cpan.org/dist/libwww-perl/
 Vcs-Svn: svn://svn.debian.org/pkg-perl/trunk/libwww-perl/

Modified: trunk/libwww-perl/lib/HTTP/Daemon.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libwww-perl/lib/HTTP/Daemon.pm?rev=34016&op=diff
==============================================================================
--- trunk/libwww-perl/lib/HTTP/Daemon.pm (original)
+++ trunk/libwww-perl/lib/HTTP/Daemon.pm Sat Apr 25 03:31:14 2009
@@ -3,7 +3,7 @@
 use strict;
 use vars qw($VERSION @ISA $PROTO $DEBUG);
 
-$VERSION = "5.818";
+$VERSION = "5.826";
 
 use IO::Socket qw(AF_INET INADDR_ANY inet_ntoa);
 @ISA=qw(IO::Socket::INET);
@@ -278,21 +278,6 @@
 	return;
 
     }
-    elsif ($ct && lc($ct) =~ m/^multipart\/\w+\s*;.*boundary\s*=\s*(\w+)/) {
-	# Handle multipart content type
-	my $boundary = "$CRLF--$1--$CRLF";
-	my $index;
-	while (1) {
-	    $index = index($buf, $boundary);
-	    last if $index >= 0;
-	    # end marker not yet found
-	    return unless $self->_need_more($buf, $timeout, $fdset);
-	}
-	$index += length($boundary);
-	$r->content(substr($buf, 0, $index));
-	substr($buf, 0, $index) = '';
-
-    }
     elsif ($len) {
 	# Plain body specified by "Content-Length"
 	my $missing = $len - length($buf);
@@ -310,6 +295,21 @@
 	    $r->content($buf);
 	    $buf='';
 	}
+    }
+    elsif ($ct && $ct =~ m/^multipart\/\w+\s*;.*boundary\s*=\s*("?)(\w+)\1/i) {
+	# Handle multipart content type
+	my $boundary = "$CRLF--$2--";
+	my $index;
+	while (1) {
+	    $index = index($buf, $boundary);
+	    last if $index >= 0;
+	    # end marker not yet found
+	    return unless $self->_need_more($buf, $timeout, $fdset);
+	}
+	$index += length($boundary);
+	$r->content(substr($buf, 0, $index));
+	substr($buf, 0, $index) = '';
+
     }
     ${*$self}{'httpd_rbuf'} = $buf;
 

Modified: trunk/libwww-perl/lib/HTTP/Message.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libwww-perl/lib/HTTP/Message.pm?rev=34016&op=diff
==============================================================================
--- trunk/libwww-perl/lib/HTTP/Message.pm (original)
+++ trunk/libwww-perl/lib/HTTP/Message.pm Sat Apr 25 03:31:14 2009
@@ -2,7 +2,7 @@
 
 use strict;
 use vars qw($VERSION $AUTOLOAD);
-$VERSION = "5.824";
+$VERSION = "5.826";
 
 require HTTP::Headers;
 require Carp;
@@ -97,11 +97,17 @@
 }
 
 sub headers {
-    shift->{'_headers'};
+    my $self = shift;
+
+    # recalculation of _content might change headers, so we
+    # need to force it now
+    $self->_content unless exists $self->{_content};
+
+    $self->{_headers};
 }
 
 sub headers_as_string {
-    shift->{'_headers'}->as_string(@_);
+    shift->headers->as_string(@_);
 }
 
 
@@ -525,7 +531,7 @@
 }
 
 
-# delegate all other method calls the the _headers object.
+# delegate all other method calls the the headers object.
 sub AUTOLOAD
 {
     my $method = substr($AUTOLOAD, rindex($AUTOLOAD, '::')+2);
@@ -533,7 +539,7 @@
     # We create the function here so that it will not need to be
     # autoloaded the next time.
     no strict 'refs';
-    *$method = sub { shift->{'_headers'}->$method(@_) };
+    *$method = sub { shift->headers->$method(@_) };
     goto &$method;
 }
 
@@ -589,7 +595,7 @@
 # Create private _content attribute from current _parts
 sub _content {
     my $self = shift;
-    my $ct = $self->header("Content-Type") || "multipart/mixed";
+    my $ct = $self->{_headers}->header("Content-Type") || "multipart/mixed";
     if ($ct =~ m,^\s*message/,i) {
 	_set_content($self, $self->{_parts}[0]->as_string($CRLF), 1);
 	return;
@@ -634,7 +640,7 @@
     }
 
     $ct = HTTP::Headers::Util::join_header_words(@v);
-    $self->header("Content-Type", $ct);
+    $self->{_headers}->header("Content-Type", $ct);
 
     _set_content($self, "--$boundary$CRLF" .
 	                join("$CRLF--$boundary$CRLF", @parts) .

Modified: trunk/libwww-perl/lib/LWP.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libwww-perl/lib/LWP.pm?rev=34016&op=diff
==============================================================================
--- trunk/libwww-perl/lib/LWP.pm (original)
+++ trunk/libwww-perl/lib/LWP.pm Sat Apr 25 03:31:14 2009
@@ -1,6 +1,6 @@
 package LWP;
 
-$VERSION = "5.825";
+$VERSION = "5.826";
 sub Version { $VERSION; }
 
 require 5.005;

Modified: trunk/libwww-perl/lib/LWP/Protocol.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libwww-perl/lib/LWP/Protocol.pm?rev=34016&op=diff
==============================================================================
--- trunk/libwww-perl/lib/LWP/Protocol.pm (original)
+++ trunk/libwww-perl/lib/LWP/Protocol.pm Sat Apr 25 03:31:14 2009
@@ -2,7 +2,7 @@
 
 require LWP::MemberMixin;
 @ISA = qw(LWP::MemberMixin);
-$VERSION = "5.822";
+$VERSION = "5.826";
 
 use strict;
 use Carp ();
@@ -97,6 +97,7 @@
     my($ua, $max_size) = @{$self}{qw(ua max_size)};
 
     eval {
+	local $\; # protect the print below from surprises
         if (!defined($arg) || !$response->is_success) {
             $response->{default_add_content} = 1;
         }

Modified: trunk/libwww-perl/lib/LWP/UserAgent.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libwww-perl/lib/LWP/UserAgent.pm?rev=34016&op=diff
==============================================================================
--- trunk/libwww-perl/lib/LWP/UserAgent.pm (original)
+++ trunk/libwww-perl/lib/LWP/UserAgent.pm Sat Apr 25 03:31:14 2009
@@ -5,7 +5,7 @@
 
 require LWP::MemberMixin;
 @ISA = qw(LWP::MemberMixin);
-$VERSION = "5.824";
+$VERSION = "5.826";
 
 use HTTP::Request ();
 use HTTP::Response ();
@@ -37,6 +37,7 @@
 
     my $agent = delete $cnf{agent};
     my $from  = delete $cnf{from};
+    my $def_headers = delete $cnf{default_headers};
     my $timeout = delete $cnf{timeout};
     $timeout = 3*60 unless defined $timeout;
     my $use_eval = delete $cnf{use_eval};
@@ -78,7 +79,7 @@
     }
 
     my $self = bless {
-		      def_headers  => undef,
+		      def_headers  => $def_headers,
 		      timeout      => $timeout,
 		      use_eval     => $use_eval,
                       show_progress=> $show_progress,
@@ -157,11 +158,12 @@
                 $@ =~ s/ at .* line \d+.*//s;  # remove file/line number
                 $response =  _new_response($request, &HTTP::Status::RC_NOT_IMPLEMENTED, $@);
                 if ($scheme eq "https") {
-                    $response->message($response->message . " (Crypt::SSLeay not installed)");
+                    $response->message($response->message . " (Crypt::SSLeay or IO::Socket::SSL not installed)");
                     $response->content_type("text/plain");
                     $response->content(<<EOT);
-LWP will support https URLs if the Crypt::SSLeay module is installed.
-More information at <http://www.linpro.no/lwp/libwww-perl/README.SSL>.
+LWP will support https URLs if either Crypt::SSLeay or IO::Socket::SSL
+is installed. More information at
+<http://search.cpan.org/dist/libwww-perl/README.SSL>.
 EOT
                 }
             }
@@ -462,6 +464,8 @@
 sub progress {
     my($self, $status, $m) = @_;
     return unless $self->{show_progress};
+
+    local($,, $\);
     if ($status eq "begin") {
         print STDERR "** ", $m->method, " ", $m->uri, " ==> ";
         $self->{progress_start} = time;
@@ -923,6 +927,8 @@
 	    $self->no_proxy(split(/\s*,\s*/, $v));
 	}
 	else {
+            # Ignore random _proxy variables, allow only valid schemes
+            next unless $k =~ /^$URI::scheme_re\z/;
 	    $self->proxy($k, $v);
 	}
     }

Modified: trunk/libwww-perl/t/base/message.t
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libwww-perl/t/base/message.t?rev=34016&op=diff
==============================================================================
--- trunk/libwww-perl/t/base/message.t (original)
+++ trunk/libwww-perl/t/base/message.t Sat Apr 25 03:31:14 2009
@@ -3,7 +3,7 @@
 use strict;
 use Test qw(plan ok skip);
 
-plan tests => 118;
+plan tests => 119;
 
 require HTTP::Message;
 use Config qw(%Config);
@@ -285,6 +285,7 @@
 
 $m = HTTP::Message->new;
 $m->add_part(HTTP::Message->new([a=>[1..3]], "a"));
+ok($m->header("Content-Type"), "multipart/mixed; boundary=xYzZY");
 $str = $m->as_string;
 $str =~ s/\r/<CR>/g;
 ok($str, <<EOT);




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