r41069 - in /trunk/libcgi-pm-perl: CGI.pm Changes META.yml debian/changelog debian/control debian/rules
ansgar-guest at users.alioth.debian.org
ansgar-guest at users.alioth.debian.org
Fri Jul 31 10:33:32 UTC 2009
Author: ansgar-guest
Date: Fri Jul 31 10:33:25 2009
New Revision: 41069
URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=41069
Log:
* New upstream release
* Bump Standards-Version to 3.8.2 (no changes).
* Use shorter debian/rules.
Modified:
trunk/libcgi-pm-perl/CGI.pm
trunk/libcgi-pm-perl/Changes
trunk/libcgi-pm-perl/META.yml
trunk/libcgi-pm-perl/debian/changelog
trunk/libcgi-pm-perl/debian/control
trunk/libcgi-pm-perl/debian/rules
Modified: trunk/libcgi-pm-perl/CGI.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libcgi-pm-perl/CGI.pm?rev=41069&op=diff
==============================================================================
--- trunk/libcgi-pm-perl/CGI.pm (original)
+++ trunk/libcgi-pm-perl/CGI.pm Fri Jul 31 10:33:25 2009
@@ -18,8 +18,8 @@
# The most recent version and complete docs are available at:
# http://stein.cshl.org/WWW/software/CGI/
-$CGI::revision = '$Id: CGI.pm,v 1.263 2009/02/11 16:56:37 lstein Exp $';
-$CGI::VERSION='3.43';
+$CGI::revision = '$Id: CGI.pm,v 1.266 2009/07/30 16:32:34 lstein Exp $';
+$CGI::VERSION='3.44';
# HARD-CODED LOCATION FOR FILE UPLOAD TEMPORARY FILES.
# UNCOMMENT THIS ONLY IF YOU KNOW WHAT YOU'RE DOING.
@@ -644,8 +644,17 @@
}
if ($meth eq 'POST' || $meth eq 'PUT') {
- $self->read_from_client(\$query_string,$content_length,0)
- if $content_length > 0;
+ if ( $content_length > 0 ) {
+ $self->read_from_client(\$query_string,$content_length,0);
+ }
+ else {
+ $self->read_from_stdin(\$query_string);
+ # should this be PUTDATA in case of PUT ?
+ my($param) = $meth . 'DATA' ;
+ $self->add_parameter($param) ;
+ push (@{$self->{param}{$param}},$query_string);
+ undef $query_string ;
+ }
# Some people want to have their cake and eat it too!
# Uncomment this line to have the contents of the query string
# APPENDED to the POST data.
@@ -653,7 +662,8 @@
last METHOD;
}
- # If $meth is not of GET, POST or HEAD, assume we're being debugged offline.
+ # If $meth is not of GET, POST, PUT or HEAD, assume we're
+ # being debugged offline.
# Check the command line and then the standard input for data.
# We use the shellwords package in order to behave the way that
# UN*X programmers expect.
@@ -673,10 +683,10 @@
&& defined($ENV{'CONTENT_TYPE'})
&& $ENV{'CONTENT_TYPE'} !~ m|^application/x-www-form-urlencoded|
&& $ENV{'CONTENT_TYPE'} !~ m|^multipart/form-data| ) {
- my($param) = $meth . 'DATA' ;
- $self->add_parameter($param) ;
- push (@{$self->{param}{$param}},$query_string);
- undef $query_string ;
+ my($param) = $meth . 'DATA' ;
+ $self->add_parameter($param) ;
+ push (@{$self->{param}{$param}},$query_string);
+ undef $query_string ;
}
# YL: End Change for XML handler 10/19/2001
@@ -997,6 +1007,47 @@
}
END_OF_FUNC
+'read_from_stdin' => <<'END_OF_FUNC',
+# Read data from stdin until all is read
+sub read_from_stdin {
+ my($self, $buff) = @_;
+ local $^W=0; # prevent a warning
+
+ #
+ # TODO: loop over STDIN until all is read
+ #
+
+ my($eoffound) = 0;
+ my($localbuf) = '';
+ my($tempbuf) = '';
+ my($bufsiz) = 1024;
+ my($res);
+ while ($eoffound == 0) {
+ if ( $MOD_PERL ) {
+ $res = $self->r->read($tempbuf, $bufsiz, 0)
+ }
+ else {
+ $res = read(\*STDIN, $tempbuf, $bufsiz);
+ }
+
+ if ( !defined($res) ) {
+ # TODO: how to do error reporting ?
+ $eoffound = 1;
+ last;
+ }
+ if ( $res == 0 ) {
+ $eoffound = 1;
+ last;
+ }
+ $localbuf .= $tempbuf;
+ }
+
+ $$buff = $localbuf;
+
+ return $res;
+}
+END_OF_FUNC
+
'delete' => <<'END_OF_FUNC',
#### Method: delete
# Deletes the named parameter entirely.
@@ -1129,6 +1180,12 @@
'MethPost' => <<'END_OF_FUNC',
sub MethPost {
return request_method() eq 'POST';
+}
+END_OF_FUNC
+
+'MethPut' => <<'END_OF_FUNC',
+sub MethPut {
+ return request_method() eq 'PUT';
}
END_OF_FUNC
@@ -2779,9 +2836,8 @@
# value of the cookie, if any. For efficiency, we cache the parsed
# cookies in our state variables.
unless ( defined($value) ) {
- $self->{'.cookies'} = CGI::Cookie->fetch
- unless $self->{'.cookies'};
-
+ $self->{'.cookies'} = CGI::Cookie->fetch;
+
# If no name is supplied, then retrieve the names of all our cookies.
return () unless $self->{'.cookies'};
return keys %{$self->{'.cookies'}} unless $name;
@@ -3185,8 +3241,12 @@
'http' => <<'END_OF_FUNC',
sub http {
my ($self,$parameter) = self_or_CGI(@_);
- return $ENV{$parameter} if $parameter=~/^HTTP/;
- $parameter =~ tr/-/_/;
+ if ( defined($parameter) ) {
+ if ( $parameter =~ /^HTTP/ ) {
+ return $ENV{$parameter};
+ }
+ $parameter =~ tr/-/_/;
+ }
return $ENV{"HTTP_\U$parameter\E"} if $parameter;
my(@p);
for (keys %ENV) {
@@ -3426,7 +3486,7 @@
$header{'Content-Disposition'} ||= ''; # quench uninit variable warning
- my($param)= $header{'Content-Disposition'}=~/ name="([^"]*)"/;
+ my($param)= $header{'Content-Disposition'}=~/[\s;]name="([^"]*)"/;
$param .= $TAINTED;
# See RFC 1867, 2183, 2045
Modified: trunk/libcgi-pm-perl/Changes
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libcgi-pm-perl/Changes?rev=41069&op=diff
==============================================================================
--- trunk/libcgi-pm-perl/Changes (original)
+++ trunk/libcgi-pm-perl/Changes Fri Jul 31 10:33:25 2009
@@ -1,3 +1,9 @@
+ Version 3.44
+ 1. Patch from Kurt Jaeger to allow HTTP PUT even if the content length is unknown.
+ 2. Patch from Pavel merdin to fix a problem for one of the FireFox addons.
+ 3. Fixed issue in mod_perl & fastCGI environment of cookies returned from
+ CGI->cookie() leaking from one session to another.
+
Version 3.43
1. Documentation patch from MARKSTOS at cpan.org to replace all occurrences of
"new CGI" with CGI->new()" to reflect best perl practices.
Modified: trunk/libcgi-pm-perl/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libcgi-pm-perl/META.yml?rev=41069&op=diff
==============================================================================
--- trunk/libcgi-pm-perl/META.yml (original)
+++ trunk/libcgi-pm-perl/META.yml Fri Jul 31 10:33:25 2009
@@ -1,6 +1,6 @@
--- #YAML:1.0
name: CGI.pm
-version: 3.43
+version: 3.44
abstract: ~
license: ~
author: ~
Modified: trunk/libcgi-pm-perl/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libcgi-pm-perl/debian/changelog?rev=41069&op=diff
==============================================================================
--- trunk/libcgi-pm-perl/debian/changelog (original)
+++ trunk/libcgi-pm-perl/debian/changelog Fri Jul 31 10:33:25 2009
@@ -1,8 +1,14 @@
-libcgi-pm-perl (3.43-2) UNRELEASED; urgency=low
+libcgi-pm-perl (3.44-1) UNRELEASED; urgency=low
+ [ Nathan Handler ]
* debian/watch: Update to ignore development releases.
- -- Nathan Handler <nhandler at ubuntu.com> Sat, 06 Jun 2009 01:33:02 +0000
+ [ Ansgar Burchardt ]
+ * New upstream release
+ * Bump Standards-Version to 3.8.2 (no changes).
+ * Use shorter debian/rules.
+
+ -- Ansgar Burchardt <ansgar at 43-1.org> Fri, 31 Jul 2009 12:16:57 +0200
libcgi-pm-perl (3.43-1) unstable; urgency=low
Modified: trunk/libcgi-pm-perl/debian/control
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libcgi-pm-perl/debian/control?rev=41069&op=diff
==============================================================================
--- trunk/libcgi-pm-perl/debian/control (original)
+++ trunk/libcgi-pm-perl/debian/control Fri Jul 31 10:33:25 2009
@@ -1,13 +1,13 @@
Source: libcgi-pm-perl
Section: perl
Priority: optional
-Build-Depends: debhelper (>= 7), quilt (>= 0.40)
+Build-Depends: debhelper (>= 7.0.50), quilt (>= 0.46-7)
Build-Depends-Indep: perl (>= 5.6.10-12), libfcgi-perl
Maintainer: Debian Perl Group <pkg-perl-maintainers at lists.alioth.debian.org>
Uploaders: AGOSTINI Yves <agostini at univ-metz.fr>,
Damyan Ivanov <dmn at debian.org>, Ansgar Burchardt <ansgar at 43-1.org>,
gregor herrmann <gregoa at debian.org>
-Standards-Version: 3.8.1
+Standards-Version: 3.8.2
Homepage: http://search.cpan.org/dist/CGI.pm/
Vcs-Svn: svn://svn.debian.org/pkg-perl/trunk/libcgi-pm-perl/
Vcs-Browser: http://svn.debian.org/viewsvn/pkg-perl/trunk/libcgi-pm-perl/
Modified: trunk/libcgi-pm-perl/debian/rules
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libcgi-pm-perl/debian/rules?rev=41069&op=diff
==============================================================================
--- trunk/libcgi-pm-perl/debian/rules (original)
+++ trunk/libcgi-pm-perl/debian/rules Fri Jul 31 10:33:25 2009
@@ -1,35 +1,17 @@
#!/usr/bin/make -f
-
-include /usr/share/quilt/quilt.make
-
TMP=$(CURDIR)/debian/libcgi-pm-perl
-build: build-stamp
-build-stamp: $(QUILT_STAMPFN)
- dh build
- touch $@
+%:
+ dh --with quilt $@
-clean: unpatch
- dh $@
-
-install: install-stamp
-install-stamp: build-stamp
- dh install --until dh_installexamples
- sed -i -e 's;#!/usr/local/bin/perl;#!/usr/bin/perl;' $(TMP)/usr/share/doc/libcgi-pm-perl/examples/*.cgi
- dh install --remaining
+override_dh_auto_install:
+ dh_auto_install
# this file is also in libcgi-fast-perl, produced by perl source
# package. see #489928
$(RM) $(TMP)/usr/share/perl5/CGI/Fast.pm
- $(RM) $(TMP)/usr/share/man/man3/CGI::Fast.3pm.gz
+ $(RM) $(TMP)/usr/share/man/man3/CGI::Fast.3pm
- touch $@
-
-binary-arch:
-
-binary-indep: install
- dh $@
-
-binary: binary-arch binary-indep
-
-.PHONY: binary binary-arch binary-indep install clean build
+override_dh_installexamples:
+ dh_installexamples
+ sed -i -e 's;#!/usr/local/bin/perl;#!/usr/bin/perl;' $(TMP)/usr/share/doc/libcgi-pm-perl/examples/*.cgi
More information about the Pkg-perl-cvs-commits
mailing list