Hello community,
here is the log from the commit of package perl-libwww-perl
checked in at Wed Apr 9 21:48:29 CEST 2008.
--------
--- perl-libwww-perl/perl-libwww-perl.changes 2007-10-08 10:06:33.000000000 +0200
+++ /mounts/work_src_done/STABLE/perl-libwww-perl/perl-libwww-perl.changes 2008-04-09 13:55:41.000000000 +0200
@@ -1,0 +2,24 @@
+Wed Apr 9 13:47:57 CEST 2008 - anicka@suse.cz
+
+- update to 5.810
+ * Small documentation issues
+ * Explain $netloc argument to $ua->credentials
+ * Make lwp-request honour option -b while dumping links
+ * Ignore params for date convenience methods
+ * Get rid of all the old CVS $Keyword:...$ templates.
+ Set $VERSION to 5.810.
+ * Complement the HTTP::Status codes
+ * Don't allow HTTP::Message content to be set to Unicode strings.
+ * Refactor test for Encode.pm
+ * Trigger HTML::HeadParser for XHTML
+ * Escape status line in error_as_HTML, convert to lowercase
+ * Protocol/file.pm: postpone load of URI::Escape and HTML::Entities
+ * HTML::Form Module and <button> element clicks
+ * HTTP::Cookies handle malformed empty Set-Cookie badly
+ * [HTTP::Request::Common] Does not handle filenames containing "
+ * Allow malformed chars in $mess->decoded_content
+ * Croak if LWP::UserAgent is constructed with hash ref as argument
+ * Disabled, checked radiobutton being submitted
+ * warn if TextInput's maxlength exceeded
+
+-------------------------------------------------------------------
Old:
----
libwww-perl-5.808.tar.bz2
New:
----
libwww-perl-5.810.tar.bz2
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ perl-libwww-perl.spec ++++++
--- /var/tmp/diff_new_pack.c22554/_old 2008-04-09 21:45:10.000000000 +0200
+++ /var/tmp/diff_new_pack.c22554/_new 2008-04-09 21:45:10.000000000 +0200
@@ -1,7 +1,7 @@
#
-# spec file for package perl-libwww-perl (Version 5.808)
+# spec file for package perl-libwww-perl (Version 5.810)
#
-# Copyright (c) 2007 SUSE LINUX Products GmbH, Nuernberg, Germany.
+# Copyright (c) 2008 SUSE LINUX Products GmbH, Nuernberg, Germany.
# This file and all modifications and additions to the pristine
# package are under the same license as the package itself.
#
@@ -10,9 +10,10 @@
# norootforbuild
+
Name: perl-libwww-perl
BuildRequires: perl-Compress-Zlib perl-HTML-Parser perl-URI
-Version: 5.808
+Version: 5.810
Release: 1
Provides: libwww-perl
Provides: perl_lw3
@@ -79,13 +80,35 @@
%{perl_vendorarch}/auto/LWP
%{_bindir}/*
/var/adm/perl-modules/%{name}
+
%changelog
-* Mon Oct 08 2007 - anicka@suse.cz
+* Wed Apr 09 2008 anicka@suse.cz
+- update to 5.810
+ * Small documentation issues
+ * Explain $netloc argument to $ua->credentials
+ * Make lwp-request honour option -b while dumping links
+ * Ignore params for date convenience methods
+ * Get rid of all the old CVS $Keyword:...$ templates.
+ Set $VERSION to 5.810.
+ * Complement the HTTP::Status codes
+ * Don't allow HTTP::Message content to be set to Unicode strings.
+ * Refactor test for Encode.pm
+ * Trigger HTML::HeadParser for XHTML
+ * Escape status line in error_as_HTML, convert to lowercase
+ * Protocol/file.pm: postpone load of URI::Escape and HTML::Entities
+ * HTML::Form Module and <button> element clicks
+ * HTTP::Cookies handle malformed empty Set-Cookie badly
+ * [HTTP::Request::Common] Does not handle filenames containing "
+ * Allow malformed chars in $mess->decoded_content
+ * Croak if LWP::UserAgent is constructed with hash ref as argument
+ * Disabled, checked radiobutton being submitted
+ * warn if TextInput's maxlength exceeded
+* Mon Oct 08 2007 anicka@suse.cz
- update to 5.808
* Get rid of t/live/validator test. Too much JavaScript madness
for it to be a sane LWP test.
* bugfixes
-* Wed Jul 25 2007 - anicka@suse.cz
+* Wed Jul 25 2007 anicka@suse.cz
- update to 5.806
* Added progress callback to LWP::UserAgent.
* Add support for HTTP Expect header to HTTP::Daemon
@@ -93,60 +116,60 @@
installed.
* Add HTML::Tagset as a prerequisite to Makefile.PL
* bugfixes
-* Wed Oct 18 2006 - anicka@suse.cz
+* Wed Oct 18 2006 anicka@suse.cz
- add perl-Crypt-SSLeay to Recommends (#211537)
-* Wed Jan 25 2006 - mls@suse.de
+* Wed Jan 25 2006 mls@suse.de
- converted neededforbuild to BuildRequires
-* Fri Jan 13 2006 - anicka@suse.cz
+* Fri Jan 13 2006 anicka@suse.cz
- update to 5.805
-* Thu Feb 17 2005 - mjancar@suse.cz
+* Thu Feb 17 2005 mjancar@suse.cz
- update top 5.803
-* Thu Feb 26 2004 - mjancar@suse.cz
+* Thu Feb 26 2004 mjancar@suse.cz
update to 5.76
-* Wed Oct 22 2003 - mjancar@suse.cz
+* Wed Oct 22 2003 mjancar@suse.cz
- update to 5.73
-* Fri Aug 22 2003 - mjancar@suse.cz
+* Fri Aug 22 2003 mjancar@suse.cz
- require the perl version we build with
-* Thu Jul 17 2003 - mjancar@suse.cz
+* Thu Jul 17 2003 mjancar@suse.cz
- adapt to perl-5.8.1
- use %%perl_process_packlist
-* Mon Jun 16 2003 - mjancar@suse.cz
+* Mon Jun 16 2003 mjancar@suse.cz
- fix filelist
-* Tue Jun 10 2003 - mjancar@suse.cz
+* Tue Jun 10 2003 mjancar@suse.cz
- update to 5.69
- don't package MANIFEST
-* Mon May 19 2003 - ro@suse.de
+* Mon May 19 2003 ro@suse.de
- remove perllocal.pod
-* Mon Jul 29 2002 - mls@suse.de
+* Mon Jul 29 2002 mls@suse.de
- Fixed neededforbuild for perl-5.8.0
-* Fri Jul 12 2002 - prehak@suse.cz
+* Fri Jul 12 2002 prehak@suse.cz
- update to version 5.65
- enabled make test
-* Tue Jul 02 2002 - mls@suse.de
+* Tue Jul 02 2002 mls@suse.de
- remove race in .packlist generation
-* Wed Jan 16 2002 - rvasice@suse.cz
+* Wed Jan 16 2002 rvasice@suse.cz
- fixed needeforbuild, disabled make test
-* Tue Jan 15 2002 - rvasice@suse.cz
+* Tue Jan 15 2002 rvasice@suse.cz
- update to version 5.63
-* Tue Aug 14 2001 - rvasice@suse.cz
+* Tue Aug 14 2001 rvasice@suse.cz
- update to version 5.53
-* Fri Apr 20 2001 - cihlar@suse.cz
+* Fri Apr 20 2001 cihlar@suse.cz
- on ia64 removed tests which starts and then connect
server
-* Mon Mar 26 2001 - cihlar@suse.cz
+* Mon Mar 26 2001 cihlar@suse.cz
- added make test
-* Wed Mar 14 2001 - cihlar@suse.cz
+* Wed Mar 14 2001 cihlar@suse.cz
- update to version 5.50
-* Tue Nov 14 2000 - cihlar@suse.cz
+* Tue Nov 14 2000 cihlar@suse.cz
- renamed perl_lw3 -> perl-libwww-perl
-* Thu Aug 24 2000 - cihlar@suse.cz
+* Thu Aug 24 2000 cihlar@suse.cz
- updated to version 5.48
- bzipped sources
-* Mon Aug 21 2000 - ro@suse.de
+* Mon Aug 21 2000 ro@suse.de
- adapted for perl-5.6
-* Wed Jul 12 2000 - cihlar@suse.cz
+* Wed Jul 12 2000 cihlar@suse.cz
- fixed bug with sort
-* Mon Jun 19 2000 - ro@suse.de
+* Mon Jun 19 2000 ro@suse.de
- fixed requires and neededforbuild
-* Mon Jun 19 2000 - cihlar@suse.cz
+* Mon Jun 19 2000 cihlar@suse.cz
- package created
++++++ libwww-perl-5.808.tar.bz2 -> libwww-perl-5.810.tar.bz2 ++++++
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/libwww-perl-5.808/bin/lwp-download new/libwww-perl-5.810/bin/lwp-download
--- old/libwww-perl-5.808/bin/lwp-download 2007-07-19 22:26:11.000000000 +0200
+++ new/libwww-perl-5.810/bin/lwp-download 2008-04-07 15:07:18.000000000 +0200
@@ -1,7 +1,5 @@
#!/usr/bin/perl -w
-# $Id: lwp-download,v 2.16 2007/07/19 20:26:11 gisle Exp $
-
=head1 NAME
lwp-download - Fetch large files from the web
@@ -75,11 +73,10 @@
my $url = URI->new(shift || usage());
my $argfile = shift;
usage() if defined($argfile) && !length($argfile);
-my $version = q$Revision: 2.16 $;
-$version =~ s/[^\d.]//g;
+my $VERSION = "5.810";
my $ua = LWP::UserAgent->new(
- agent => "lwp-download/$version ",
+ agent => "lwp-download/$VERSION ",
keep_alive => 1,
env_proxy => 1,
);
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/libwww-perl-5.808/bin/lwp-mirror new/libwww-perl-5.810/bin/lwp-mirror
--- old/libwww-perl-5.808/bin/lwp-mirror 2004-04-10 13:19:33.000000000 +0200
+++ new/libwww-perl-5.810/bin/lwp-mirror 2008-04-07 15:07:18.000000000 +0200
@@ -1,7 +1,5 @@
#!/usr/bin/perl -w
-# $Id: lwp-mirror,v 2.3 2004/04/10 11:19:33 gisle Exp $
-#
# Simple mirror utility using LWP
=head1 NAME
@@ -47,7 +45,7 @@
$progname =~ s,.*/,,; # use basename only
$progname =~ s/\.\w*$//; #strip extension if any
-$VERSION = sprintf("%d.%02d", q$Revision: 2.3 $ =~ /(\d+)\.(\d+)/);
+$VERSION = "5.810";
$opt_h = undef; # print usage
$opt_v = undef; # print version
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/libwww-perl-5.808/bin/lwp-request new/libwww-perl-5.810/bin/lwp-request
--- old/libwww-perl-5.808/bin/lwp-request 2007-07-19 22:26:11.000000000 +0200
+++ new/libwww-perl-5.810/bin/lwp-request 2008-04-07 15:07:18.000000000 +0200
@@ -1,18 +1,16 @@
#!/usr/bin/perl -w
-# $Id: lwp-request,v 2.8 2007/07/19 20:26:11 gisle Exp $
-#
# Simple user agent using LWP library.
=head1 NAME
-lwp-request - Simple command line user agent
+lwp-request, GET, POST, HEAD - Simple command line user agent
=head1 SYNOPSIS
- lwp-request [-aeEdvhx] [-m method] [-b <base URL>] [-t <timeout>]
- [-i <if-modified-since>] [-c <content-type>] [-C <credentials>]
- [-p <proxy-url>] [-o <format>] <url>...
+B<lwp-request> [B<-afPuUsSedvhx>] [B<-m> I<method>] [B<-b> I<base URL>] [B<-t> I<timeout>]
+ [B<-i> I<if-modified-since>] [B<-c> I<content-type>]
+ [B<-C> I<credentials>] [B<-p> I<proxy-url>] [B<-o> I<format>] I<url>...
=head1 DESCRIPTION
@@ -71,6 +69,10 @@
proxy settings from the environment. You can disable this with the
C<-P> option.
+=item -P
+
+Don't load proxy settings from environment.
+
=item -H <header>
Send this HTTP header with each request. You can specify several, e.g.:
@@ -182,7 +184,7 @@
$progname =~ s,.*[\\/],,; # use basename only
$progname =~ s/\.\w*$//; # strip extension, if any
-$VERSION = sprintf("%d.%02d", q$Revision: 2.8 $ =~ /(\d+)\.(\d+)/);
+$VERSION = "5.810";
require LWP;
@@ -473,6 +475,7 @@
};
$options{'o'} eq 'links' && do {
my $base = $response->base;
+ $base = $options{'b'} if $options{'b'};
for ( @{ $html->extract_links } ) {
my($link, $elem) = @$_;
my $tag = uc $elem->tag;
@@ -527,6 +530,8 @@
-p <proxyurl> use this as a proxy
-P don't load proxy settings from environment
-H <header> send this HTTP header (you can specify several)
+ -C <username>:<password>
+ provide credentials for basic authentication
-u Display method and URL before any response
-U Display request headers (implies -u)
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/libwww-perl-5.808/bin/lwp-rget new/libwww-perl-5.810/bin/lwp-rget
--- old/libwww-perl-5.808/bin/lwp-rget 2004-04-10 13:22:46.000000000 +0200
+++ new/libwww-perl-5.810/bin/lwp-rget 2008-04-07 15:07:18.000000000 +0200
@@ -152,7 +152,7 @@
$progname =~ s|.*/||; # only basename left
$progname =~ s/\.\w*$//; #strip extension if any
-$VERSION = sprintf("%d.%02d", q$Revision: 2.4 $ =~ /(\d+)\.(\d+)/);
+$VERSION = "5.810";
#$Getopt::Long::debug = 1;
#$Getopt::Long::ignorecase = 0;
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/libwww-perl-5.808/Changes new/libwww-perl-5.810/Changes
--- old/libwww-perl-5.808/Changes 2007-08-05 15:20:48.000000000 +0200
+++ new/libwww-perl-5.810/Changes 2008-04-08 13:20:10.000000000 +0200
@@ -1,3 +1,50 @@
+2008-04-08 Gisle Aas
+
+ Release 5.810
+
+ Gisle Aas (10):
+ Small documentation issues [RT#31346]
+ Explain $netloc argument to $ua->credentials [RT#31969]
+ Make lwp-request honour option -b while dumping links [RT#31347]
+ Ignore params for date convenience methods [RT#30579]
+ Get rid of all the old CVS $Keyword:...$ templates. Set $VERSION to 5.810.
+ Update Copyright year.
+ Drop some sample URLs that were failing.
+ Complement the HTTP::Status codes [RT#29619]
+ Don't allow HTTP::Message content to be set to Unicode strings.
+ Refactor test for Encode.pm
+
+ Ville Skytta (3):
+ Spelling fixes [RT#33272]
+ Trigger HTML::HeadParser for XHTML [RT#33271]
+ Escape status line in error_as_HTML, convert to lowercase [RT#33270]
+
+ Alexey Tourbin (2):
+ Typo fix [RT#33843]
+ Protocol/file.pm: postpone load of URI::Escape and HTML::Entities [RT#33842]
+
+ Daniel Hedlund (1):
+ HTML::Form Module and <button> element clicks
+
+ Adam Kennedy (1):
+ HTTP::Cookies handle malformed empty Set-Cookie badly [RT#29401]
+
+ Jacob J (1):
+ [HTTP::Request::Common] Does not handle filenames containing " [RT#30538]
+
+ Rolf Grossmann (1):
+ Allow malformed chars in $mess->decoded_content [RT#17368]
+
+ FWILES (1):
+ Croak if LWP::UserAgent is constructed with hash ref as argument [RT#28597]
+
+ Adam Sjogren (1):
+ Disabled, checked radiobutton being submitted [RT#33512]
+
+ DAVIDRW (1):
+ warn if TextInput's maxlength exceeded [RT#32239]
+
+
2007-08-05 Gisle Aas
Release 5.808
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/libwww-perl-5.808/lib/Bundle/LWP.pm new/libwww-perl-5.810/lib/Bundle/LWP.pm
--- old/libwww-perl-5.808/lib/Bundle/LWP.pm 2003-12-14 12:07:46.000000000 +0100
+++ new/libwww-perl-5.810/lib/Bundle/LWP.pm 2008-04-07 14:57:56.000000000 +0200
@@ -1,6 +1,6 @@
package Bundle::LWP;
-$VERSION = sprintf("%d.%02d", q$Revision: 1.11 $ =~ /(\d+)\.(\d+)/);
+$VERSION = "5.810";
1;
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/libwww-perl-5.808/lib/File/Listing.pm new/libwww-perl-5.810/lib/File/Listing.pm
--- old/libwww-perl-5.808/lib/File/Listing.pm 2003-10-26 15:24:22.000000000 +0100
+++ new/libwww-perl-5.810/lib/File/Listing.pm 2008-04-07 14:57:56.000000000 +0200
@@ -1,9 +1,7 @@
package File::Listing;
-# $Id: Listing.pm,v 1.15 2003/10/26 14:24:22 gisle Exp $
-
sub Version { $VERSION; }
-$VERSION = sprintf("%d.%02d", q$Revision: 1.15 $ =~ /(\d+)\.(\d+)/);
+$VERSION = "5.810";
require Exporter;
@ISA = qw(Exporter);
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/libwww-perl-5.808/lib/HTML/Form.pm new/libwww-perl-5.810/lib/HTML/Form.pm
--- old/libwww-perl-5.808/lib/HTML/Form.pm 2005-12-07 15:32:27.000000000 +0100
+++ new/libwww-perl-5.810/lib/HTML/Form.pm 2008-04-07 14:57:56.000000000 +0200
@@ -1,13 +1,11 @@
package HTML::Form;
-# $Id: Form.pm,v 1.54 2005/12/07 14:32:27 gisle Exp $
-
use strict;
use URI;
use Carp ();
use vars qw($VERSION);
-$VERSION = sprintf("%d.%03d", q$Revision: 1.54 $ =~ /(\d+)\.(\d+)/);
+$VERSION = "5.810";
my %form_tags = map {$_ => 1} qw(input textarea button select option);
@@ -17,13 +15,13 @@
hidden => "TextInput",
textarea => "TextInput",
- button => "IgnoreInput",
"reset" => "IgnoreInput",
radio => "ListInput",
checkbox => "ListInput",
option => "ListInput",
+ button => "SubmitInput",
submit => "SubmitInput",
image => "ImageInput",
file => "FileInput",
@@ -117,7 +115,7 @@
my $p = HTML::TokeParser->new(ref($html) ? $html->decoded_content(ref => 1) : \$html);
eval {
# optimization
- $p->report_tags(qw(form input textarea select optgroup option keygen label));
+ $p->report_tags(qw(form input textarea select optgroup option keygen label button));
};
my $base_uri = delete $opt{base};
@@ -183,6 +181,10 @@
my $type = delete $attr->{type} || "text";
$f->push_input($type, $attr);
}
+ elsif ($tag eq "button") {
+ my $type = delete $attr->{type} || "submit";
+ $f->push_input($type, $attr);
+ }
elsif ($tag eq "textarea") {
$attr->{textarea_value} = $attr->{value}
if exists $attr->{value};
@@ -903,7 +905,7 @@
my $self = shift;
my $name = $self->{'name'};
return unless defined $name;
- return if $self->{disabled};
+ return if $self->disabled;
my $value = $self->value;
return unless defined $value;
return ($name => $value);
@@ -964,7 +966,11 @@
if (@_) {
Carp::carp("Input '$self->{name}' is readonly")
if $^W && $self->{readonly};
- $self->{value} = shift;
+ my $new = shift;
+ my $n = exists $self->{maxlength} ? $self->{maxlength} : undef;
+ Carp::carp("Input '$self->{name}' has maxlength '$n'")
+ if $^W && defined($n) && defined($new) && length($new) > $n;
+ $self->{value} = $new;
}
$old;
}
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/libwww-perl-5.808/lib/HTTP/Cookies/Microsoft.pm new/libwww-perl-5.810/lib/HTTP/Cookies/Microsoft.pm
--- old/libwww-perl-5.808/lib/HTTP/Cookies/Microsoft.pm 2003-10-15 21:27:51.000000000 +0200
+++ new/libwww-perl-5.810/lib/HTTP/Cookies/Microsoft.pm 2008-04-07 14:57:56.000000000 +0200
@@ -4,7 +4,7 @@
use vars qw(@ISA $VERSION);
-$VERSION = sprintf("%d.%02d", q$Revision: 1.7 $ =~ /(\d+)\.(\d+)/);
+$VERSION = "5.810";
require HTTP::Cookies;
@ISA=qw(HTTP::Cookies);
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/libwww-perl-5.808/lib/HTTP/Cookies/Netscape.pm new/libwww-perl-5.810/lib/HTTP/Cookies/Netscape.pm
--- old/libwww-perl-5.808/lib/HTTP/Cookies/Netscape.pm 2003-10-24 13:16:58.000000000 +0200
+++ new/libwww-perl-5.810/lib/HTTP/Cookies/Netscape.pm 2008-04-07 14:57:56.000000000 +0200
@@ -3,7 +3,7 @@
use strict;
use vars qw(@ISA $VERSION);
-$VERSION = sprintf("%d.%02d", q$Revision: 1.26 $ =~ /(\d+)\.(\d+)/);
+$VERSION = "5.810";
require HTTP::Cookies;
@ISA=qw(HTTP::Cookies);
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/libwww-perl-5.808/lib/HTTP/Cookies.pm new/libwww-perl-5.810/lib/HTTP/Cookies.pm
--- old/libwww-perl-5.808/lib/HTTP/Cookies.pm 2004-11-12 11:06:12.000000000 +0100
+++ new/libwww-perl-5.810/lib/HTTP/Cookies.pm 2008-04-07 14:57:56.000000000 +0200
@@ -6,7 +6,7 @@
use LWP::Debug ();
use vars qw($VERSION $EPOCH_OFFSET);
-$VERSION = sprintf("%d.%02d", q$Revision: 1.39 $ =~ /(\d+)\.(\d+)/);
+$VERSION = "5.810";
# Legacy: because "use "HTTP::Cookies" used be the ONLY way
# to load the class HTTP::Cookies::Netscape.
@@ -199,7 +199,7 @@
if (@ns_set) {
# The old Netscape cookie format for Set-Cookie
- # http://www.netscape.com/newsref/std/cookie_spec.html
+ # http://wp.netscape.com/newsref/std/cookie_spec.html
# can for instance contain an unquoted "," in the expires
# field, so we have to use this ad-hoc parser.
my $now = time();
@@ -240,6 +240,7 @@
}
$first_param = 0;
}
+ next unless @cur;
next if $in_set2{$cur[0]};
# push(@cur, "Port" => $req_port);
@@ -626,7 +627,7 @@
Cookies are a general mechanism which server side connections can use
to both store and retrieve information on the client side of the
connection. For more information about cookies refer to
-URL:http://www.netscape.com/newsref/std/cookie_spec.html and
+URL:http://wp.netscape.com/newsref/std/cookie_spec.html and
URL:http://www.cookiecentral.com/. This module also implements the
new style cookies described in I.
The two variants of cookies are supposed to be able to coexist happily.
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/libwww-perl-5.808/lib/HTTP/Daemon.pm new/libwww-perl-5.810/lib/HTTP/Daemon.pm
--- old/libwww-perl-5.808/lib/HTTP/Daemon.pm 2007-07-19 23:24:31.000000000 +0200
+++ new/libwww-perl-5.810/lib/HTTP/Daemon.pm 2008-04-07 14:57:56.000000000 +0200
@@ -1,11 +1,9 @@
package HTTP::Daemon;
-# $Id: Daemon.pm,v 1.39 2007/07/19 21:24:31 gisle Exp $
-
use strict;
use vars qw($VERSION @ISA $PROTO $DEBUG);
-$VERSION = sprintf("%d.%02d", q$Revision: 1.39 $ =~ /(\d+)\.(\d+)/);
+$VERSION = "5.810";
use IO::Socket qw(AF_INET INADDR_ANY inet_ntoa);
@ISA=qw(IO::Socket::INET);
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/libwww-perl-5.808/lib/HTTP/Date.pm new/libwww-perl-5.810/lib/HTTP/Date.pm
--- old/libwww-perl-5.808/lib/HTTP/Date.pm 2005-12-06 12:09:25.000000000 +0100
+++ new/libwww-perl-5.810/lib/HTTP/Date.pm 2008-04-07 14:57:56.000000000 +0200
@@ -1,6 +1,6 @@
-package HTTP::Date; # $Date: 2005/12/06 11:09:25 $
+package HTTP::Date;
-$VERSION = sprintf("%d.%02d", q$Revision: 1.47 $ =~ /(\d+)\.(\d+)/);
+$VERSION = "5.810";
require 5.004;
require Exporter;
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/libwww-perl-5.808/lib/HTTP/Headers/Auth.pm new/libwww-perl-5.810/lib/HTTP/Headers/Auth.pm
--- old/libwww-perl-5.808/lib/HTTP/Headers/Auth.pm 2005-02-19 01:34:46.000000000 +0100
+++ new/libwww-perl-5.810/lib/HTTP/Headers/Auth.pm 2008-04-07 14:57:56.000000000 +0200
@@ -2,7 +2,7 @@
use strict;
use vars qw($VERSION);
-$VERSION = sprintf("%d.%02d", q$Revision: 1.4 $ =~ /(\d+)\.(\d+)/);
+$VERSION = "5.810";
use HTTP::Headers;
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/libwww-perl-5.808/lib/HTTP/Headers/ETag.pm new/libwww-perl-5.810/lib/HTTP/Headers/ETag.pm
--- old/libwww-perl-5.808/lib/HTTP/Headers/ETag.pm 2003-10-23 21:11:32.000000000 +0200
+++ new/libwww-perl-5.810/lib/HTTP/Headers/ETag.pm 2008-04-07 14:57:56.000000000 +0200
@@ -2,7 +2,7 @@
use strict;
use vars qw($VERSION);
-$VERSION = sprintf("%d.%02d", q$Revision: 1.4 $ =~ /(\d+)\.(\d+)/);
+$VERSION = "5.810";
require HTTP::Date;
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/libwww-perl-5.808/lib/HTTP/Headers/Util.pm new/libwww-perl-5.810/lib/HTTP/Headers/Util.pm
--- old/libwww-perl-5.808/lib/HTTP/Headers/Util.pm 2003-10-23 21:11:32.000000000 +0200
+++ new/libwww-perl-5.810/lib/HTTP/Headers/Util.pm 2008-04-07 14:57:57.000000000 +0200
@@ -3,7 +3,7 @@
use strict;
use vars qw($VERSION @ISA @EXPORT_OK);
-$VERSION = sprintf("%d.%02d", q$Revision: 1.13 $ =~ /(\d+)\.(\d+)/);
+$VERSION = "5.810";
require Exporter;
@ISA=qw(Exporter);
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/libwww-perl-5.808/lib/HTTP/Headers.pm new/libwww-perl-5.810/lib/HTTP/Headers.pm
--- old/libwww-perl-5.808/lib/HTTP/Headers.pm 2005-12-08 13:11:48.000000000 +0100
+++ new/libwww-perl-5.810/lib/HTTP/Headers.pm 2008-04-07 14:57:57.000000000 +0200
@@ -1,12 +1,10 @@
package HTTP::Headers;
-# $Id: Headers.pm,v 1.64 2005/12/08 12:11:48 gisle Exp $
-
use strict;
use Carp ();
use vars qw($VERSION $TRANSLATE_UNDERSCORE);
-$VERSION = sprintf("%d.%02d", q$Revision: 1.64 $ =~ /(\d+)\.(\d+)/);
+$VERSION = "5.810";
# The $TRANSLATE_UNDERSCORE variable controls whether '_' can be used
# as a replacement for '-' in header field names.
@@ -260,6 +258,7 @@
if (defined $time) {
$self->_header($header, HTTP::Date::time2str($time));
}
+ $old =~ s/;.*// if defined($old);
HTTP::Date::str2time($old);
}
@@ -292,6 +291,19 @@
wantarray ? @ct : $ct[0];
}
+sub _is_html {
+ my $self = shift;
+ return $self->content_type eq 'text/html' || $self->_is_xhtml;
+}
+
+sub _is_xhtml {
+ my $ct = shift->content_type;
+ for (qw(application/xhtml+xml application/vnd.wap.xhtml+xml)) {
+ return 1 if $_ eq $ct;
+ }
+ return 0;
+}
+
sub referer {
my $self = shift;
if (@_ && $_[0] =~ /#/) {
@@ -529,7 +541,7 @@
=head1 CONVENIENCE METHODS
The most frequently used headers can also be accessed through the
-following convenience methods. These methods can both be used to read
+following convenience Methods. These methods can both be used to read
and to set the value of a header. The header value is set if you pass
an argument to the method. The old header value is always returned.
If the given header did not exist then C<undef> is returned.
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/libwww-perl-5.808/lib/HTTP/Message.pm new/libwww-perl-5.810/lib/HTTP/Message.pm
--- old/libwww-perl-5.808/lib/HTTP/Message.pm 2005-02-18 21:29:01.000000000 +0100
+++ new/libwww-perl-5.810/lib/HTTP/Message.pm 2008-04-08 12:42:20.000000000 +0200
@@ -1,10 +1,8 @@
package HTTP::Message;
-# $Id: Message.pm,v 1.57 2005/02/18 20:29:01 gisle Exp $
-
use strict;
use vars qw($VERSION $AUTOLOAD);
-$VERSION = sprintf("%d.%02d", q$Revision: 1.57 $ =~ /(\d+)\.(\d+)/);
+$VERSION = "5.810";
require HTTP::Headers;
require Carp;
@@ -13,7 +11,7 @@
$HTTP::URI_CLASS ||= $ENV{PERL_HTTP_URI_CLASS} || "URI";
eval "require $HTTP::URI_CLASS"; die $@ if $@;
-
+*_is_utf8 = defined &utf8::is_utf8 ? \&utf8::is_utf8 : sub { 0 };
sub new
{
@@ -30,7 +28,14 @@
else {
$header = HTTP::Headers->new;
}
- $content = '' unless defined $content;
+ if (defined $content) {
+ if (_is_utf8($content)) {
+ Carp::croak("HTTP::Message content not bytes");
+ }
+ }
+ else {
+ $content = '';
+ }
bless {
'_headers' => $header,
@@ -105,6 +110,9 @@
sub _set_content {
my $self = $_[0];
+ if (_is_utf8($_[1])) {
+ Carp::croak("HTTP::Message content not bytes")
+ }
if (!ref($_[1]) && ref($self->{_content}) eq "SCALAR") {
${$self->{_content}} = $_[1];
}
@@ -124,6 +132,10 @@
my $chunkref = \$_[0];
$chunkref = $$chunkref if ref($$chunkref); # legacy
+ if (_is_utf8($$chunkref)) {
+ Carp::croak("HTTP::Message added content not bytes");
+ }
+
my $ref = ref($self->{_content});
if (!$ref) {
$self->{_content} .= $$chunkref;
@@ -269,7 +281,7 @@
$content_ref_iscopy++;
}
$content_ref = \Encode::decode($charset, $$content_ref,
- Encode::FB_CROAK() | Encode::LEAVE_SRC());
+ ($opt{charset_strict} ? Encode::FB_CROAK() : 0) | Encode::LEAVE_SRC());
}
}
};
@@ -597,11 +609,17 @@
This override the default charset of "ISO-8859-1".
+=item C
+
+Abort decoding when if malformed characters is found in the content. By
+default you get the substitution character ("\x{FFFD}") in place of
+mailformed characters.
+
=item C
If TRUE then raise an exception if not able to decode content. Reason
might be that the specified C<Content-Encoding> or C<charset> is not
-supported. If this option is FALSE, then decode_content() will return
+supported. If this option is FALSE, then decoded_content() will return
C<undef> on errors, but will still set $@.
=item C<ref>
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/libwww-perl-5.808/lib/HTTP/Negotiate.pm new/libwww-perl-5.810/lib/HTTP/Negotiate.pm
--- old/libwww-perl-5.808/lib/HTTP/Negotiate.pm 2005-12-06 14:51:46.000000000 +0100
+++ new/libwww-perl-5.810/lib/HTTP/Negotiate.pm 2008-04-07 14:57:57.000000000 +0200
@@ -1,9 +1,6 @@
-# $Id: Negotiate.pm,v 1.16 2005/12/06 13:51:46 gisle Exp $
-#
-
package HTTP::Negotiate;
-$VERSION = sprintf("%d.%02d", q$Revision: 1.16 $ =~ /(\d+)\.(\d+)/);
+$VERSION = "5.810";
sub Version { $VERSION; }
require 5.002;
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/libwww-perl-5.808/lib/HTTP/Request/Common.pm new/libwww-perl-5.810/lib/HTTP/Request/Common.pm
--- old/libwww-perl-5.808/lib/HTTP/Request/Common.pm 2007-07-19 22:46:48.000000000 +0200
+++ new/libwww-perl-5.810/lib/HTTP/Request/Common.pm 2008-04-07 14:57:57.000000000 +0200
@@ -1,5 +1,3 @@
-# $Id: Common.pm,v 1.28 2007/07/19 20:46:48 gisle Exp $
-#
package HTTP::Request::Common;
use strict;
@@ -15,7 +13,7 @@
require HTTP::Request;
use Carp();
-$VERSION = sprintf("%d.%02d", q$Revision: 1.28 $ =~ /(\d+)\.(\d+)/);
+$VERSION = "5.810";
my $CRLF = "\015\012"; # "\r\n" is not portable
@@ -134,8 +132,12 @@
$usename = $file;
$usename =~ s,.*/,, if defined($usename);
}
+ $k =~ s/([\\\"])/\\$1/g;
my $disp = qq(form-data; name="$k");
- $disp .= qq(; filename="$usename") if $usename;
+ if ($usename) {
+ $usename =~ s/([\\\"])/\\$1/g;
+ $disp .= qq(; filename="$usename");
+ }
my $content = "";
my $h = HTTP::Headers->new(@headers);
if ($file) {
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/libwww-perl-5.808/lib/HTTP/Request.pm new/libwww-perl-5.810/lib/HTTP/Request.pm
--- old/libwww-perl-5.808/lib/HTTP/Request.pm 2004-04-07 12:44:47.000000000 +0200
+++ new/libwww-perl-5.810/lib/HTTP/Request.pm 2008-04-07 14:57:57.000000000 +0200
@@ -1,10 +1,8 @@
package HTTP::Request;
-# $Id: Request.pm,v 1.40 2004/04/07 10:44:47 gisle Exp $
-
require HTTP::Message;
@ISA = qw(HTTP::Message);
-$VERSION = sprintf("%d.%02d", q$Revision: 1.40 $ =~ /(\d+)\.(\d+)/);
+$VERSION = "5.810";
use strict;
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/libwww-perl-5.808/lib/HTTP/Response.pm new/libwww-perl-5.810/lib/HTTP/Response.pm
--- old/libwww-perl-5.808/lib/HTTP/Response.pm 2005-12-06 14:19:09.000000000 +0100
+++ new/libwww-perl-5.810/lib/HTTP/Response.pm 2008-04-07 14:57:57.000000000 +0200
@@ -1,10 +1,8 @@
package HTTP::Response;
-# $Id: Response.pm,v 1.53 2005/12/06 13:19:09 gisle Exp $
-
require HTTP::Message;
@ISA = qw(HTTP::Message);
-$VERSION = sprintf("%d.%02d", q$Revision: 1.53 $ =~ /(\d+)\.(\d+)/);
+$VERSION = "5.810";
use strict;
use HTTP::Status ();
@@ -121,17 +119,18 @@
sub error_as_HTML
{
+ require HTML::Entities;
my $self = shift;
my $title = 'An Error Occurred';
- my $body = $self->status_line;
+ my $body = HTML::Entities::encode($self->status_line);
return <decoded_content( %options )
This will return the content after any C<Content-Encoding> and
-charsets has been decoded. See LHTTP::Message for details.
+charsets have been decoded. See LHTTP::Message for details.
=item $r->request
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/libwww-perl-5.808/lib/HTTP/Status.pm new/libwww-perl-5.810/lib/HTTP/Status.pm
--- old/libwww-perl-5.808/lib/HTTP/Status.pm 2003-10-23 20:56:01.000000000 +0200
+++ new/libwww-perl-5.810/lib/HTTP/Status.pm 2008-04-07 22:24:00.000000000 +0200
@@ -1,7 +1,5 @@
package HTTP::Status;
-# $Id: Status.pm,v 1.28 2003/10/23 18:56:01 uid39246 Exp $
-
use strict;
require 5.002; # becase we use prototypes
@@ -11,14 +9,17 @@
@ISA = qw(Exporter);
@EXPORT = qw(is_info is_success is_redirect is_error status_message);
@EXPORT_OK = qw(is_client_error is_server_error);
-$VERSION = sprintf("%d.%02d", q$Revision: 1.28 $ =~ /(\d+)\.(\d+)/);
+$VERSION = "5.810";
# Note also addition of mnemonics to @EXPORT below
+# Unmarked codes are from RFC 2616
+# See also: http://en.wikipedia.org/wiki/List_of_HTTP_status_codes
+
my %StatusCode = (
100 => 'Continue',
101 => 'Switching Protocols',
- 102 => 'Processing', # WebDAV
+ 102 => 'Processing', # RFC 2518 (WebDAV)
200 => 'OK',
201 => 'Created',
202 => 'Accepted',
@@ -26,7 +27,7 @@
204 => 'No Content',
205 => 'Reset Content',
206 => 'Partial Content',
- 207 => 'Multi-Status', # WebDAV
+ 207 => 'Multi-Status', # RFC 2518 (WebDAV)
300 => 'Multiple Choices',
301 => 'Moved Permanently',
302 => 'Found',
@@ -52,16 +53,22 @@
415 => 'Unsupported Media Type',
416 => 'Request Range Not Satisfiable',
417 => 'Expectation Failed',
- 422 => 'Unprocessable Entity', # WebDAV
- 423 => 'Locked', # WebDAV
- 424 => 'Failed Dependency', # WebDAV
+ 422 => 'Unprocessable Entity', # RFC 2518 (WebDAV)
+ 423 => 'Locked', # RFC 2518 (WebDAV)
+ 424 => 'Failed Dependency', # RFC 2518 (WebDAV)
+ 425 => 'No code', # WebDAV Advanced Collections
+ 426 => 'Upgrade Required', # RFC 2817
+ 449 => 'Retry with', # unofficial Microsoft
500 => 'Internal Server Error',
501 => 'Not Implemented',
502 => 'Bad Gateway',
503 => 'Service Unavailable',
504 => 'Gateway Timeout',
505 => 'HTTP Version Not Supported',
- 507 => 'Insufficient Storage', # WebDAV
+ 506 => 'Variant Also Negotiates', # RFC 2295
+ 507 => 'Insufficient Storage', # RFC 2518 (WebDAV)
+ 509 => 'Bandwidth Limit Exceeded', # unofficial
+ 510 => 'Not Extended', # RFC 2774
);
my $mnemonicCode = '';
@@ -166,6 +173,9 @@
RC_UNPROCESSABLE_ENTITY (422)
RC_LOCKED (423)
RC_FAILED_DEPENDENCY (424)
+ RC_NO_CODE (425)
+ RC_UPGRADE_REQUIRED (426)
+ RC_RETRY_WITH (449)
RC_INTERNAL_SERVER_ERROR (500)
RC_NOT_IMPLEMENTED (501)
@@ -173,7 +183,10 @@
RC_SERVICE_UNAVAILABLE (503)
RC_GATEWAY_TIMEOUT (504)
RC_HTTP_VERSION_NOT_SUPPORTED (505)
+ RC_VARIANT_ALSO_NEGOTIATES (506)
RC_INSUFFICIENT_STORAGE (507)
+ RC_BANDWIDTH_LIMIT_EXCEEDED (509)
+ RC_NOT_EXTENDED (510)
=head1 FUNCTIONS
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/libwww-perl-5.808/lib/LWP/Authen/Ntlm.pm new/libwww-perl-5.810/lib/LWP/Authen/Ntlm.pm
--- old/libwww-perl-5.808/lib/LWP/Authen/Ntlm.pm 2002-12-20 08:53:23.000000000 +0100
+++ new/libwww-perl-5.810/lib/LWP/Authen/Ntlm.pm 2008-04-07 14:57:57.000000000 +0200
@@ -3,7 +3,7 @@
use strict;
use vars qw/$VERSION/;
-$VERSION = '0.05';
+$VERSION = '5.810';
use Authen::NTLM "1.02";
use MIME::Base64 "2.12";
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/libwww-perl-5.808/lib/LWP/ConnCache.pm new/libwww-perl-5.810/lib/LWP/ConnCache.pm
--- old/libwww-perl-5.808/lib/LWP/ConnCache.pm 2004-04-09 17:07:04.000000000 +0200
+++ new/libwww-perl-5.810/lib/LWP/ConnCache.pm 2008-04-07 14:57:57.000000000 +0200
@@ -1,11 +1,9 @@
package LWP::ConnCache;
-# $Id: ConnCache.pm,v 1.6 2004/04/09 15:07:04 gisle Exp $
-
use strict;
use vars qw($VERSION $DEBUG);
-$VERSION = "0.01";
+$VERSION = "5.810";
sub new {
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/libwww-perl-5.808/lib/LWP/DebugFile.pm new/libwww-perl-5.810/lib/LWP/DebugFile.pm
--- old/libwww-perl-5.808/lib/LWP/DebugFile.pm 2003-10-23 20:56:01.000000000 +0200
+++ new/libwww-perl-5.810/lib/LWP/DebugFile.pm 2008-04-07 14:57:57.000000000 +0200
@@ -1,7 +1,5 @@
package LWP::DebugFile;
-# $Id: DebugFile.pm,v 1.3 2003/10/23 18:56:01 uid39246 Exp $
-
use strict;
use LWP::Debug ();
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/libwww-perl-5.808/lib/LWP/Debug.pm new/libwww-perl-5.810/lib/LWP/Debug.pm
--- old/libwww-perl-5.808/lib/LWP/Debug.pm 2004-04-09 17:07:04.000000000 +0200
+++ new/libwww-perl-5.810/lib/LWP/Debug.pm 2008-04-07 14:57:57.000000000 +0200
@@ -1,7 +1,5 @@
package LWP::Debug;
-# $Id: Debug.pm,v 1.15 2004/04/09 15:07:04 gisle Exp $
-
require Exporter;
@ISA = qw(Exporter);
@EXPORT_OK = qw(level trace debug conns);
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/libwww-perl-5.808/lib/LWP/media.types new/libwww-perl-5.810/lib/LWP/media.types
--- old/libwww-perl-5.808/lib/LWP/media.types 2004-04-06 13:15:04.000000000 +0200
+++ new/libwww-perl-5.810/lib/LWP/media.types 2008-04-07 14:57:57.000000000 +0200
@@ -1,5 +1,3 @@
-# $Id: media.types,v 1.5 2004/04/06 11:15:04 gisle Exp $
-#
# This file defines the mapping from file name extentions to media types.
# Media types where the subtype does not have the "x-" prefix should be
# registered by IANA:
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/libwww-perl-5.808/lib/LWP/MediaTypes.pm new/libwww-perl-5.810/lib/LWP/MediaTypes.pm
--- old/libwww-perl-5.808/lib/LWP/MediaTypes.pm 2007-07-19 22:26:11.000000000 +0200
+++ new/libwww-perl-5.810/lib/LWP/MediaTypes.pm 2008-04-07 14:57:57.000000000 +0200
@@ -1,12 +1,10 @@
package LWP::MediaTypes;
-# $Id: MediaTypes.pm,v 1.33 2007/07/19 20:26:11 gisle Exp $
-
require Exporter;
@ISA = qw(Exporter);
@EXPORT = qw(guess_media_type media_suffix);
@EXPORT_OK = qw(add_type add_encoding read_media_types);
-$VERSION = sprintf("%d.%02d", q$Revision: 1.33 $ =~ /(\d+)\.(\d+)/);
+$VERSION = "5.810";
require LWP::Debug;
use strict;
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/libwww-perl-5.808/lib/LWP/MemberMixin.pm new/libwww-perl-5.810/lib/LWP/MemberMixin.pm
--- old/libwww-perl-5.808/lib/LWP/MemberMixin.pm 2004-04-09 17:07:04.000000000 +0200
+++ new/libwww-perl-5.810/lib/LWP/MemberMixin.pm 2008-04-07 14:57:57.000000000 +0200
@@ -1,7 +1,5 @@
package LWP::MemberMixin;
-# $Id: MemberMixin.pm,v 1.8 2004/04/09 15:07:04 gisle Exp $
-
sub _elem
{
my $self = shift;
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/libwww-perl-5.808/lib/LWP/Protocol/data.pm new/libwww-perl-5.810/lib/LWP/Protocol/data.pm
--- old/libwww-perl-5.808/lib/LWP/Protocol/data.pm 1998-11-19 22:45:01.000000000 +0100
+++ new/libwww-perl-5.810/lib/LWP/Protocol/data.pm 2008-04-07 14:57:57.000000000 +0200
@@ -1,10 +1,7 @@
-#
-# $Id: data.pm,v 1.2 1998/11/19 21:45:01 aas Exp $
-#
-# Implements access to data:-URLs as specified in RFC 2397
+package LWP::Protocol::data;
+# Implements access to data:-URLs as specified in RFC 2397
-package LWP::Protocol::data;
use strict;
use vars qw(@ISA);
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/libwww-perl-5.808/lib/LWP/Protocol/file.pm new/libwww-perl-5.810/lib/LWP/Protocol/file.pm
--- old/libwww-perl-5.808/lib/LWP/Protocol/file.pm 2004-11-15 23:53:36.000000000 +0100
+++ new/libwww-perl-5.810/lib/LWP/Protocol/file.pm 2008-04-07 14:57:57.000000000 +0200
@@ -1,6 +1,3 @@
-#
-# $Id: file.pm,v 1.23 2004/11/15 22:53:36 gisle Exp $
-
package LWP::Protocol::file;
require LWP::Protocol;
@@ -14,10 +11,6 @@
require HTTP::Status;
require HTTP::Date;
-require URI::Escape;
-require HTML::Entities;
-
-
sub request
{
@@ -96,6 +89,8 @@
closedir(D);
# Make directory listing
+ require URI::Escape;
+ require HTML::Entities;
my $pathe = $path . ( $^O eq 'MacOS' ? ':' : '/');
for (@files) {
my $furl = URI::Escape::uri_escape($_);
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/libwww-perl-5.808/lib/LWP/Protocol/ftp.pm new/libwww-perl-5.810/lib/LWP/Protocol/ftp.pm
--- old/libwww-perl-5.808/lib/LWP/Protocol/ftp.pm 2003-10-23 21:11:32.000000000 +0200
+++ new/libwww-perl-5.810/lib/LWP/Protocol/ftp.pm 2008-04-07 14:57:57.000000000 +0200
@@ -1,11 +1,8 @@
-#
-# $Id: ftp.pm,v 1.36 2003/10/23 19:11:32 uid39246 Exp $
+package LWP::Protocol::ftp;
# Implementation of the ftp protocol (RFC 959). We let the Net::FTP
# package do all the dirty work.
-package LWP::Protocol::ftp;
-
use Carp ();
use HTTP::Status ();
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/libwww-perl-5.808/lib/LWP/Protocol/GHTTP.pm new/libwww-perl-5.810/lib/LWP/Protocol/GHTTP.pm
--- old/libwww-perl-5.808/lib/LWP/Protocol/GHTTP.pm 2003-10-14 14:01:27.000000000 +0200
+++ new/libwww-perl-5.810/lib/LWP/Protocol/GHTTP.pm 2008-04-07 14:57:57.000000000 +0200
@@ -1,8 +1,5 @@
package LWP::Protocol::GHTTP;
-# $Id: GHTTP.pm,v 1.3 2003/10/14 12:01:27 gisle Exp $
-
-#
# You can tell LWP to use this module for 'http' requests by running
# code like this before you make requests:
#
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/libwww-perl-5.808/lib/LWP/Protocol/gopher.pm new/libwww-perl-5.810/lib/LWP/Protocol/gopher.pm
--- old/libwww-perl-5.808/lib/LWP/Protocol/gopher.pm 2003-10-23 21:11:33.000000000 +0200
+++ new/libwww-perl-5.810/lib/LWP/Protocol/gopher.pm 2008-04-07 14:57:57.000000000 +0200
@@ -1,5 +1,4 @@
-#
-# $Id: gopher.pm,v 1.20 2003/10/23 19:11:33 uid39246 Exp $
+package LWP::Protocol::gopher;
# Implementation of the gopher protocol (RFC 1436)
#
@@ -7,9 +6,6 @@
# which in turn is a vastly modified version of Oscar's http'get()
# dated 28/3/94 in ftp://cui.unige.ch/PUBLIC/oscar/scripts/http.pl
# including contributions from Marc van Heyningen and Martijn Koster.
-#
-
-package LWP::Protocol::gopher;
use strict;
use vars qw(@ISA);
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/libwww-perl-5.808/lib/LWP/Protocol/http10.pm new/libwww-perl-5.810/lib/LWP/Protocol/http10.pm
--- old/libwww-perl-5.808/lib/LWP/Protocol/http10.pm 2003-10-23 21:11:33.000000000 +0200
+++ new/libwww-perl-5.810/lib/LWP/Protocol/http10.pm 2008-04-07 14:57:57.000000000 +0200
@@ -1,6 +1,3 @@
-#
-# $Id: http10.pm,v 1.3 2003/10/23 19:11:33 uid39246 Exp $
-
package LWP::Protocol::http10;
use strict;
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/libwww-perl-5.808/lib/LWP/Protocol/http.pm new/libwww-perl-5.810/lib/LWP/Protocol/http.pm
--- old/libwww-perl-5.808/lib/LWP/Protocol/http.pm 2005-12-08 11:28:01.000000000 +0100
+++ new/libwww-perl-5.810/lib/LWP/Protocol/http.pm 2008-04-07 14:57:57.000000000 +0200
@@ -1,6 +1,3 @@
-# $Id: http.pm,v 1.70 2005/12/08 10:28:01 gisle Exp $
-#
-
package LWP::Protocol::http;
use strict;
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/libwww-perl-5.808/lib/LWP/Protocol/https10.pm new/libwww-perl-5.810/lib/LWP/Protocol/https10.pm
--- old/libwww-perl-5.808/lib/LWP/Protocol/https10.pm 2007-07-20 08:16:58.000000000 +0200
+++ new/libwww-perl-5.810/lib/LWP/Protocol/https10.pm 2008-04-07 14:57:57.000000000 +0200
@@ -1,10 +1,7 @@
-#
-# $Id: https10.pm,v 1.4 2007/07/20 06:16:58 gisle Exp $
+package LWP::Protocol::https10;
use strict;
-package LWP::Protocol::https10;
-
# Figure out which SSL implementation to use
use vars qw($SSL_CLASS);
if ($Net::SSL::VERSION) {
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/libwww-perl-5.808/lib/LWP/Protocol/https.pm new/libwww-perl-5.810/lib/LWP/Protocol/https.pm
--- old/libwww-perl-5.808/lib/LWP/Protocol/https.pm 2003-10-15 12:35:47.000000000 +0200
+++ new/libwww-perl-5.810/lib/LWP/Protocol/https.pm 2008-04-07 14:57:57.000000000 +0200
@@ -1,8 +1,5 @@
-#
package LWP::Protocol::https;
-# $Id: https.pm,v 1.12 2003/10/15 10:35:47 gisle Exp $
-
use strict;
use vars qw(@ISA);
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/libwww-perl-5.808/lib/LWP/Protocol/mailto.pm new/libwww-perl-5.810/lib/LWP/Protocol/mailto.pm
--- old/libwww-perl-5.808/lib/LWP/Protocol/mailto.pm 2004-05-21 10:56:15.000000000 +0200
+++ new/libwww-perl-5.810/lib/LWP/Protocol/mailto.pm 2008-04-07 14:57:57.000000000 +0200
@@ -1,12 +1,9 @@
-#
-# $Id: mailto.pm,v 1.12 2004/05/21 08:56:15 gisle Exp $
-#
+package LWP::Protocol::mailto;
+
# This module implements the mailto protocol. It is just a simple
# frontend to the Unix sendmail program except on MacOS, where it uses
# Mail::Internet.
-package LWP::Protocol::mailto;
-
require LWP::Protocol;
require HTTP::Request;
require HTTP::Response;
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/libwww-perl-5.808/lib/LWP/Protocol/nntp.pm new/libwww-perl-5.810/lib/LWP/Protocol/nntp.pm
--- old/libwww-perl-5.808/lib/LWP/Protocol/nntp.pm 2007-07-19 22:26:11.000000000 +0200
+++ new/libwww-perl-5.810/lib/LWP/Protocol/nntp.pm 2008-04-07 14:57:57.000000000 +0200
@@ -1,10 +1,6 @@
-#
-# $Id: nntp.pm,v 1.11 2007/07/19 20:26:11 gisle Exp $
+package LWP::Protocol::nntp;
# Implementation of the Network News Transfer Protocol (RFC 977)
-#
-
-package LWP::Protocol::nntp;
require LWP::Protocol;
@ISA = qw(LWP::Protocol);
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/libwww-perl-5.808/lib/LWP/Protocol.pm new/libwww-perl-5.810/lib/LWP/Protocol.pm
--- old/libwww-perl-5.808/lib/LWP/Protocol.pm 2007-07-19 22:26:11.000000000 +0200
+++ new/libwww-perl-5.810/lib/LWP/Protocol.pm 2008-04-07 14:57:57.000000000 +0200
@@ -1,10 +1,8 @@
package LWP::Protocol;
-# $Id: Protocol.pm,v 1.46 2007/07/19 20:26:11 gisle Exp $
-
require LWP::MemberMixin;
@ISA = qw(LWP::MemberMixin);
-$VERSION = sprintf("%d.%02d", q$Revision: 1.46 $ =~ /(\d+)\.(\d+)/);
+$VERSION = "5.810";
use strict;
use Carp ();
@@ -101,9 +99,10 @@
my($ua, $parse_head, $max_size) = @{$self}{qw(ua parse_head max_size)};
my $parser;
- if ($parse_head && $response->content_type eq 'text/html') {
+ if ($parse_head && $response->_is_html) {
require HTML::HeadParser;
$parser = HTML::HeadParser->new($response->{'_headers'});
+ $parser->xml_mode(1) if $response->_is_xhtml;
$parser->utf8_mode(1) if $] >= 5.008 && $HTML::Parser::VERSION >= 3.40;
}
my $content_size = 0;
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/libwww-perl-5.808/lib/LWP/RobotUA.pm new/libwww-perl-5.810/lib/LWP/RobotUA.pm
--- old/libwww-perl-5.808/lib/LWP/RobotUA.pm 2004-04-06 15:14:37.000000000 +0200
+++ new/libwww-perl-5.810/lib/LWP/RobotUA.pm 2008-04-07 14:57:57.000000000 +0200
@@ -1,10 +1,8 @@
package LWP::RobotUA;
-# $Id: RobotUA.pm,v 1.27 2004/04/06 13:14:37 gisle Exp $
-
require LWP::UserAgent;
@ISA = qw(LWP::UserAgent);
-$VERSION = sprintf("%d.%02d", q$Revision: 1.27 $ =~ /(\d+)\.(\d+)/);
+$VERSION = "5.810";
require WWW::RobotRules;
require HTTP::Request;
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/libwww-perl-5.808/lib/LWP/Simple.pm new/libwww-perl-5.810/lib/LWP/Simple.pm
--- old/libwww-perl-5.808/lib/LWP/Simple.pm 2004-05-21 11:11:55.000000000 +0200
+++ new/libwww-perl-5.810/lib/LWP/Simple.pm 2008-04-07 14:57:57.000000000 +0200
@@ -1,7 +1,5 @@
package LWP::Simple;
-# $Id: Simple.pm,v 1.41 2004/05/21 09:11:55 gisle Exp $
-
use strict;
use vars qw($ua %loop_check $FULL_LWP @EXPORT @EXPORT_OK $VERSION);
@@ -16,7 +14,7 @@
use HTTP::Status;
push(@EXPORT, @HTTP::Status::EXPORT);
-$VERSION = sprintf("%d.%02d", q$Revision: 1.41 $ =~ /(\d+)\.(\d+)/);
+$VERSION = "5.810";
$FULL_LWP++ if grep {lc($_) eq "http_proxy"} keys %ENV;
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/libwww-perl-5.808/lib/LWP/UserAgent.pm new/libwww-perl-5.810/lib/LWP/UserAgent.pm
--- old/libwww-perl-5.808/lib/LWP/UserAgent.pm 2006-06-05 10:36:37.000000000 +0200
+++ new/libwww-perl-5.810/lib/LWP/UserAgent.pm 2008-04-07 14:57:57.000000000 +0200
@@ -1,13 +1,11 @@
package LWP::UserAgent;
-# $Id: UserAgent.pm,v 2.36 2006/06/05 08:36:37 gisle Exp $
-
use strict;
use vars qw(@ISA $VERSION);
require LWP::MemberMixin;
@ISA = qw(LWP::MemberMixin);
-$VERSION = sprintf("%d.%03d", q$Revision: 2.36 $ =~ /(\d+)\.(\d+)/);
+$VERSION = "5.810";
use HTTP::Request ();
use HTTP::Response ();
@@ -32,6 +30,10 @@
sub new
{
+ # Check for common user mistake
+ Carp::croak("Options to LWP::UserAgent should be key/value pairs, not hash reference")
+ if ref($_[1]) eq 'HASH';
+
my($class, %cnf) = @_;
LWP::Debug::trace('()');
@@ -1012,6 +1014,11 @@
Set the user name and password to be used for a realm. It is often more
useful to specialize the get_basic_credentials() method instead.
+The $netloc a string of the form "<host>:<port>". The username and
+password will only be passed to this server. Example:
+
+ $ua->credenticals("www.example.com:80", "Some Realm", "foo", "secret");
+
=item $ua->max_size
=item $ua->max_size( $bytes )
@@ -1379,7 +1386,7 @@
=head1 COPYRIGHT
-Copyright 1995-2004 Gisle Aas.
+Copyright 1995-2008 Gisle Aas.
This library is free software; you can redistribute it and/or
modify it under the same terms as Perl itself.
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/libwww-perl-5.808/lib/LWP.pm new/libwww-perl-5.810/lib/LWP.pm
--- old/libwww-perl-5.808/lib/LWP.pm 2007-08-05 15:23:32.000000000 +0200
+++ new/libwww-perl-5.810/lib/LWP.pm 2008-04-08 13:30:58.000000000 +0200
@@ -1,9 +1,6 @@
-#
-# $Id: LWP.pm,v 1.152 2007/08/05 13:23:32 gisle Exp $
-
package LWP;
-$VERSION = "5.808";
+$VERSION = "5.810";
sub Version { $VERSION; }
require 5.005;
@@ -639,7 +636,7 @@
=head1 COPYRIGHT
- Copyright 1995-2005, Gisle Aas
+ Copyright 1995-2008, Gisle Aas
Copyright 1995, Martijn Koster
This library is free software; you can redistribute it and/or
@@ -650,7 +647,7 @@
The latest version of this library is likely to be available from CPAN
as well as:
- http://www.linpro.no/lwp/
+ http://gitorious.org/projects/libwww-perl
The best place to discuss this code is on the
mailing list.
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/libwww-perl-5.808/lib/Net/HTTP/Methods.pm new/libwww-perl-5.810/lib/Net/HTTP/Methods.pm
--- old/libwww-perl-5.808/lib/Net/HTTP/Methods.pm 2005-12-07 11:01:37.000000000 +0100
+++ new/libwww-perl-5.810/lib/Net/HTTP/Methods.pm 2008-04-07 14:57:57.000000000 +0200
@@ -1,13 +1,11 @@
package Net::HTTP::Methods;
-# $Id: Methods.pm,v 1.22 2005/12/07 10:01:37 gisle Exp $
-
require 5.005; # 4-arg substr
use strict;
use vars qw($VERSION);
-$VERSION = "1.02";
+$VERSION = "5.810";
my $CRLF = "\015\012"; # "\r\n" is not portable
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/libwww-perl-5.808/lib/Net/HTTP/NB.pm new/libwww-perl-5.810/lib/Net/HTTP/NB.pm
--- old/libwww-perl-5.808/lib/Net/HTTP/NB.pm 2004-11-12 17:18:11.000000000 +0100
+++ new/libwww-perl-5.810/lib/Net/HTTP/NB.pm 2008-04-07 14:57:57.000000000 +0200
@@ -1,11 +1,10 @@
package Net::HTTP::NB;
-# $Id: NB.pm,v 1.6 2004/11/12 16:18:11 gisle Exp $
-
use strict;
use vars qw($VERSION @ISA);
-$VERSION = "0.03";
+$VERSION = "5.810";
+
require Net::HTTP;
@ISA=qw(Net::HTTP);
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/libwww-perl-5.808/lib/Net/HTTP.pm new/libwww-perl-5.810/lib/Net/HTTP.pm
--- old/libwww-perl-5.808/lib/Net/HTTP.pm 2005-12-06 13:02:22.000000000 +0100
+++ new/libwww-perl-5.810/lib/Net/HTTP.pm 2008-04-07 14:57:57.000000000 +0200
@@ -1,11 +1,9 @@
package Net::HTTP;
-# $Id: HTTP.pm,v 1.47 2005/12/06 12:02:22 gisle Exp $
-
use strict;
use vars qw($VERSION @ISA);
-$VERSION = "1.00";
+$VERSION = "5.810";
eval { require IO::Socket::INET } || require IO::Socket;
require Net::HTTP::Methods;
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/libwww-perl-5.808/lib/Net/HTTPS.pm new/libwww-perl-5.810/lib/Net/HTTPS.pm
--- old/libwww-perl-5.808/lib/Net/HTTPS.pm 2007-07-19 22:26:11.000000000 +0200
+++ new/libwww-perl-5.810/lib/Net/HTTPS.pm 2008-04-07 14:57:57.000000000 +0200
@@ -1,11 +1,9 @@
package Net::HTTPS;
-# $Id: HTTPS.pm,v 1.4 2007/07/19 20:26:11 gisle Exp $
-
use strict;
use vars qw($VERSION $SSL_SOCKET_CLASS @ISA);
-$VERSION = "1.00";
+$VERSION = "5.810";
# Figure out which SSL implementation to use
if ($Net::SSL::VERSION) {
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/libwww-perl-5.808/lib/WWW/RobotRules/AnyDBM_File.pm new/libwww-perl-5.810/lib/WWW/RobotRules/AnyDBM_File.pm
--- old/libwww-perl-5.808/lib/WWW/RobotRules/AnyDBM_File.pm 2003-10-23 21:11:33.000000000 +0200
+++ new/libwww-perl-5.810/lib/WWW/RobotRules/AnyDBM_File.pm 2008-04-07 14:57:57.000000000 +0200
@@ -1,10 +1,8 @@
-# $Id: AnyDBM_File.pm,v 1.11 2003/10/23 19:11:33 uid39246 Exp $
-
package WWW::RobotRules::AnyDBM_File;
require WWW::RobotRules;
@ISA = qw(WWW::RobotRules);
-$VERSION = sprintf("%d.%02d", q$Revision: 1.11 $ =~ /(\d+)\.(\d+)/);
+$VERSION = "5.810";
use Carp ();
use AnyDBM_File;
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/libwww-perl-5.808/lib/WWW/RobotRules.pm new/libwww-perl-5.810/lib/WWW/RobotRules.pm
--- old/libwww-perl-5.808/lib/WWW/RobotRules.pm 2005-09-21 21:36:19.000000000 +0200
+++ new/libwww-perl-5.810/lib/WWW/RobotRules.pm 2008-04-07 14:57:58.000000000 +0200
@@ -1,8 +1,6 @@
package WWW::RobotRules;
-# $Id: RobotRules.pm,v 1.33 2005/09/21 19:36:19 gisle Exp $
-
-$VERSION = sprintf("%d.%02d", q$Revision: 1.33 $ =~ /(\d+)\.(\d+)/);
+$VERSION = "5.810";
sub Version { $VERSION; }
use strict;
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/libwww-perl-5.808/Makefile.PL new/libwww-perl-5.810/Makefile.PL
--- old/libwww-perl-5.808/Makefile.PL 2007-07-19 22:45:32.000000000 +0200
+++ new/libwww-perl-5.810/Makefile.PL 2008-04-07 14:57:58.000000000 +0200
@@ -1,5 +1,4 @@
# This -*- perl -*- script writes the Makefile for libwww-perl
-# $Id: Makefile.PL,v 1.77 2007/07/19 20:26:10 gisle Exp $
require 5.005;
use strict;
@@ -174,7 +173,7 @@
$@
The HTML::Parser is needed to extract correct base URI information from
HTML so that we can resolve relative links correctly. The HTML::Form
-module also need HTML::TokeParser to work.
+module also needs HTML::TokeParser to work.
EOT
sleep(2); # Don't hurry too much
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/libwww-perl-5.808/MANIFEST new/libwww-perl-5.810/MANIFEST
--- old/libwww-perl-5.808/MANIFEST 2007-08-05 15:19:19.000000000 +0200
+++ new/libwww-perl-5.810/MANIFEST 2008-04-08 13:43:26.000000000 +0200
@@ -85,6 +85,7 @@
t/base/ua.t Basic LWP::UserAgent tests
t/html/form.t Test HTML::Form module
t/html/form-param.t More HTML::Form tests.
+t/html/form-maxlength.t More HTML::Form tests
t/live/apache.t
t/live/apache-listing.t Test File::Listing::apache package
t/live/jigsaw-auth-b.t
@@ -118,3 +119,4 @@
t/robot/rules.t Test WWW::RobotRules
t/robot/ua-get.t
t/robot/ua.t Test LWP::RobotUA
+META.yml Module meta-data (added by MakeMaker)
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/libwww-perl-5.808/META.yml new/libwww-perl-5.810/META.yml
--- old/libwww-perl-5.808/META.yml 1970-01-01 01:00:00.000000000 +0100
+++ new/libwww-perl-5.810/META.yml 2008-04-08 13:43:25.000000000 +0200
@@ -0,0 +1,18 @@
+--- #YAML:1.0
+name: libwww-perl
+version: 5.810
+abstract: ~
+license: ~
+generated_by: ExtUtils::MakeMaker version 6.3201
+distribution_type: module
+requires:
+ Compress::Zlib: 1.10
+ Digest::MD5: 0
+ HTML::Parser: 3.33
+ HTML::Tagset: 0
+ MIME::Base64: 2.1
+ Net::FTP: 2.58
+ URI: 1.10
+meta-spec:
+ url: http://module-build.sourceforge.net/META-spec-v1.2.html
+ version: 1.2
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/libwww-perl-5.808/README new/libwww-perl-5.810/README
--- old/libwww-perl-5.808/README 2005-12-08 13:06:21.000000000 +0100
+++ new/libwww-perl-5.810/README 2008-04-08 13:30:03.000000000 +0200
@@ -104,19 +104,24 @@
AVAILABILITY
-The latest version of libwww-perl should always be available from:
+The latest version of libwww-perl is available from CPAN:
- http://www.linpro.no/lwp/
+ http://search.cpan.org/dist/libwww-perl/
-The library is also available from the Comprehensive Perl Archive
-Network (CPAN). Visit URL:http://www.perl.com/CPAN/ to find a CPAN
-site near you.
+If you want to hack on the source it might be a good idea to grab the
+latest version with git using the command:
+
+ git clone git://gitorious.org/libwww-perl/mainline.git lwp
+
+You can also browse the git repository at:
+
+ http://gitorious.org/projects/libwww-perl
COPYRIGHT
- � 1995-2005 Gisle Aas. All rights reserved.
+ � 1995-2008 Gisle Aas. All rights reserved.
� 1995 Martijn Koster. All rights reserved.
This library is free software; you can redistribute it and/or modify
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/libwww-perl-5.808/t/base/common-req.t new/libwww-perl-5.810/t/base/common-req.t
--- old/libwww-perl-5.808/t/base/common-req.t 2004-11-15 15:52:40.000000000 +0100
+++ new/libwww-perl-5.810/t/base/common-req.t 2008-04-07 14:57:58.000000000 +0200
@@ -109,17 +109,17 @@
print "ok 13\n";
$r = POST 'http://www.perl.org/survey.cgi',
- [ file => [ undef, "xxx", Content_type => "text/html", Content => "<h1>Hello, world!</h1>" ]],
+ [ file => [ undef, "xxy\"", Content_type => "text/html", Content => "<h1>Hello, world!</h1>" ]],
Content_type => 'multipart/form-data';
print $r->as_string;
if($^O eq "MacOS") {
- print "not " unless $r->content =~ /^--\S+\015\012Content-Disposition:\s*form-data;\s*name="file";\s*filename="xxx"/m and
+ print "not " unless $r->content =~ /^--\S+\015\012Content-Disposition:\s*form-data;\s*name="file";\s*filename="xxy\\"/m and
$r->content =~ /^\012Content-Type: text\/html/m and
$r->content =~ /^\012<h1>Hello, world/m;
}
else {
- print "not " unless $r->content =~ /^--\S+\015\012Content-Disposition:\s*form-data;\s*name="file";\s*filename="xxx"/m and
+ print "not " unless $r->content =~ /^--\S+\015\012Content-Disposition:\s*form-data;\s*name="file";\s*filename="xxy\\"/m and
$r->content =~ /^Content-Type: text\/html/m and
$r->content =~ /^<h1>Hello, world/m;
}
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/libwww-perl-5.808/t/base/cookies.t new/libwww-perl-5.810/t/base/cookies.t
--- old/libwww-perl-5.808/t/base/cookies.t 2004-11-12 11:08:26.000000000 +0100
+++ new/libwww-perl-5.810/t/base/cookies.t 2008-04-08 10:29:19.000000000 +0200
@@ -1,4 +1,4 @@
-print "1..42\n";
+print "1..43\n";
#use LWP::Debug '+';
use HTTP::Cookies;
@@ -658,6 +658,15 @@
Set-Cookie3: Expires=10101; path="/"; domain=example.com; discard; version=0
EOT
+# Test empty cookie header [RT#29401]
+$c = HTTP::Cookies->new;
+$res->header("Set-Cookie" => ["CUSTOMER=WILE_E_COYOTE; path=/;", ""]);
+#print $res->as_string;
+$c->extract_cookies($res);
+#print $c->as_string;
+print "not " unless $c->as_string eq <<'EOT'; print "ok 43\n";
+Set-Cookie3: CUSTOMER=WILE_E_COYOTE; path="/"; domain=example.com; path_spec; discard; version=0
+EOT
#-------------------------------------------------------------------
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/libwww-perl-5.808/t/base/headers.t new/libwww-perl-5.810/t/base/headers.t
--- old/libwww-perl-5.808/t/base/headers.t 2005-12-06 11:39:07.000000000 +0100
+++ new/libwww-perl-5.810/t/base/headers.t 2008-04-07 14:57:58.000000000 +0200
@@ -3,7 +3,7 @@
use strict;
use Test qw(plan ok);
-plan tests => 156;
+plan tests => 157;
my($h, $h2);
sub j { join("|", @_) }
@@ -420,3 +420,9 @@
content_type: text/html
foo_bar: 1
EOT
+
+# [RT#30579] IE6 appens "; length = NNNN" on If-Modified-Since (can we handle it)
+$h = HTTP::Headers->new(
+ if_modified_since => "Sat, 29 Oct 1994 19:43:31 GMT; length=34343"
+);
+ok(gmtime($h->if_modified_since), "Sat Oct 29 19:43:31 1994");
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/libwww-perl-5.808/t/base/message.t new/libwww-perl-5.810/t/base/message.t
--- old/libwww-perl-5.808/t/base/message.t 2007-07-19 22:24:10.000000000 +0200
+++ new/libwww-perl-5.810/t/base/message.t 2008-04-08 13:02:52.000000000 +0200
@@ -3,7 +3,7 @@
use strict;
use Test qw(plan ok skip);
-plan tests => 95;
+plan tests => 100;
require HTTP::Message;
require Config;
@@ -339,10 +339,10 @@
$m->content_type("text/plain; charset=UTF-8");
$m->content("H4sICFWAq0ECA3h4eAB7v3u/R6ZCSUZqUarCoxm7uAAZKHXiEAAAAA==\n");
+my $NO_ENCODE = $] < 5.008 || ($Config::Config{'extensions'} !~ /\bEncode\b/)
+ ? "No Encode module" : "";
$@ = "";
-skip($] < 5.008 || ($Config::Config{'extensions'} !~ /\bEncode\b/)
- ? "No Encode module" : "",
- sub { eval { $m->decoded_content } }, "\x{FEFF}Hi there \x{263A}\n");
+skip($NO_ENCODE, sub { eval { $m->decoded_content } }, "\x{FEFF}Hi there \x{263A}\n");
ok($@ || "", "");
ok($m->content, "H4sICFWAq0ECA3h4eAB7v3u/R6ZCSUZqUarCoxm7uAAZKHXiEAAAAA==\n");
@@ -350,12 +350,16 @@
$m->content($tmp);
$m->header("Content-Encoding", "gzip");
$@ = "";
-skip($] < 5.008 || ($Config::Config{'extensions'} !~ /\bEncode\b/)
- ? "No Encode module" : "",
- sub { eval { $m->decoded_content } }, "\x{FEFF}Hi there \x{263A}\n");
+skip($NO_ENCODE, sub { eval { $m->decoded_content } }, "\x{FEFF}Hi there \x{263A}\n");
ok($@ || "", "");
ok($m->content, $tmp);
+$m->remove_header("Content-Encoding");
+$m->content("a\xFF");
+
+skip($NO_ENCODE, sub { $m->decoded_content }, "a\x{FFFD}");
+skip($NO_ENCODE, sub { $m->decoded_content(charset_strict => 1) }, undef);
+
$m->header("Content-Encoding", "foobar");
ok($m->decoded_content, undef);
ok($@ =~ /^Don't know how to decode Content-Encoding 'foobar'/);
@@ -367,3 +371,22 @@
};
ok($@ =~ /Don't know how to decode Content-Encoding 'foobar'/);
ok($err, 0);
+
+if ($] >= 5.008001) {
+ eval {
+ HTTP::Message->new([], "\x{263A}");
+ };
+ ok($@ =~ /bytes/);
+ $m = HTTP::Message->new;
+ eval {
+ $m->add_content("\x{263A}");
+ };
+ ok($@ =~ /bytes/);
+ eval {
+ $m->content("\x{263A}");
+ };
+ ok($@ =~ /bytes/);
+}
+else {
+ skip("Missing is_utf8 test") for 1..3;
+}
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/libwww-perl-5.808/t/html/form-maxlength.t new/libwww-perl-5.810/t/html/form-maxlength.t
--- old/libwww-perl-5.808/t/html/form-maxlength.t 1970-01-01 01:00:00.000000000 +0100
+++ new/libwww-perl-5.810/t/html/form-maxlength.t 2008-04-07 14:57:58.000000000 +0200
@@ -0,0 +1,68 @@
+#!/usr/bin/perl
+
+use strict;
+use warnings;
+use lib '.';
+use Test::More tests => 16;
+use HTML::Form;
+
+my $html = do { local $/ = undef; <DATA> };
+my $form = HTML::Form->parse($html, 'foo.html' );
+isa_ok($form, 'HTML::Form');
+my $input = $form->find_input('passwd');
+isa_ok($input, 'HTML::Form::TextInput');
+
+sub set_value {
+ my $input = shift;
+ my $value = shift;
+ my $len = length($value);
+ my $old = $input->value;
+ is( $input->value($value), $old, "set value length=$len" );
+ is( $input->value, $value, "got value length=$len" );
+}
+
+{
+ my @warnings;
+ local $SIG{__WARN__} = sub { push @warnings, @_; };
+ is( $input->{maxlength}, 8, 'got maxlength: 8' );
+
+ $^W = 0;
+
+ set_value( $input, '1234' );
+ is( @warnings, 0, "No warnings so far" );
+
+ set_value( $input, '1234567890' );
+ is( @warnings, 0, "No warnings so far" );
+
+ $^W = 1;
+
+ set_value( $input, '1234' );
+ is( @warnings, 0, "No warnings so far" );
+
+ set_value( $input, '1234567890' );
+ is( @warnings, 1, "Got warning" );
+ like( $warnings[0], qr/^Input 'passwd' has maxlength '8' at /, "Got warning message" );
+}
+
+__DATA__
+
+<form method="post" action="?" enctype="application/x-www-form-urlencoded" name="login">
+<div style="display:none"><input type="hidden" name="node_id" value="109"></div>
+<input type="hidden" name="op" value="login" />
+<input type="hidden" name="lastnode_id" value="109" />
+<table border="0"><tr><td><font size="2">
+Login:</font></td><td>
+<input type="text" name="user" size=10 maxlength=34 />
+</td></tr><tr><td><font size="2">
+Password</font></td><td>
+<input type="password" name="passwd" size=10 MAXLENGTH=8 />
+
+</td></tr></table><font size="2">
+<input type="checkbox" name="expires" value="+10y" />remember me
+<input type="submit" name="login" value="Login" />
+</font><br />
+<a href="?node=What%27s%20my%20password%3F">password reminder</a>
+<br />
+<a href="?node_id=101">Create A New User</a>
+</form>
+
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/libwww-perl-5.808/t/html/form.t new/libwww-perl-5.810/t/html/form.t
--- old/libwww-perl-5.808/t/html/form.t 2005-12-07 15:32:28.000000000 +0100
+++ new/libwww-perl-5.810/t/html/form.t 2008-04-07 14:57:58.000000000 +0200
@@ -3,7 +3,7 @@
use strict;
use Test qw(plan ok);
-plan tests => 122;
+plan tests => 123;
use HTML::Form;
@@ -417,6 +417,20 @@
ok(eval{$f->find_input("m3", undef, 2)->value(undef)}, undef);
ok($@ && $@ =~ /^The 'm3' field can't be unchecked/);
+# Try a disabled radiobutton:
+$f = HTML::Form->parse(<http://localhost/");
+<form>
+ <input disabled checked type=radio name=f value=a>
+ <input type=hidden name=f value=b>
+</form>
+
+EOT
+
+ok($f->click->as_string, <<'EOT');
+GET http://localhost/?f=b
+
+EOT
+
$f = HTML::Form->parse(<http://www.example.com");
<!-- from http://www.blooberry.com/indexdot/html/tagpages/k/keygen.htm -->
<form METHOD="post" ACTION="http://example.com/secure/keygen/test.cgi" ENCTYPE="application/x-www-form-urlencoded">
diff -urN --exclude=CVS --exclude=.cvsignore --exclude=.svn --exclude=.svnignore old/libwww-perl-5.808/t/live/apache-listing.t new/libwww-perl-5.810/t/live/apache-listing.t
--- old/libwww-perl-5.808/t/live/apache-listing.t 2004-11-12 16:30:24.000000000 +0100
+++ new/libwww-perl-5.810/t/live/apache-listing.t 2008-04-07 15:17:27.000000000 +0200
@@ -8,9 +8,7 @@
# some sample URLs
my @urls = (
- "http://www.apache.org/~jon/scarab/nightly/",
"http://www.apache.org/dist/apr/?C=N&O=D",
- "http://xml.apache.org/dist/batik/",
"http://perl.apache.org/rpm/distrib/",
"http://stein.cshl.org/WWW/software/",
"http://www.cpan.org/modules/by-module/",
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
---------------------------------------------------------------------
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org