r75505 - in /trunk/libcgi-pm-perl: Changes META.yml debian/NEWS debian/changelog debian/compat debian/control debian/patches/spelling.patch lib/CGI.pm t/url.t
ghedo-guest at users.alioth.debian.org
ghedo-guest at users.alioth.debian.org
Sun Jun 12 13:33:47 UTC 2011
Author: ghedo-guest
Date: Sun Jun 12 13:33:32 2011
New Revision: 75505
URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=75505
Log:
* New upstream release 3.54
* Bump debhelper compat level to 8
* Add myself to Uploaders
* Add debian/NEWS to report incompatible changes
* Refresh patches
Added:
trunk/libcgi-pm-perl/debian/NEWS
Modified:
trunk/libcgi-pm-perl/Changes
trunk/libcgi-pm-perl/META.yml
trunk/libcgi-pm-perl/debian/changelog
trunk/libcgi-pm-perl/debian/compat
trunk/libcgi-pm-perl/debian/control
trunk/libcgi-pm-perl/debian/patches/spelling.patch
trunk/libcgi-pm-perl/lib/CGI.pm
trunk/libcgi-pm-perl/t/url.t
Modified: trunk/libcgi-pm-perl/Changes
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libcgi-pm-perl/Changes?rev=75505&op=diff
==============================================================================
--- trunk/libcgi-pm-perl/Changes (original)
+++ trunk/libcgi-pm-perl/Changes Sun Jun 12 13:33:32 2011
@@ -1,3 +1,29 @@
+
+Version 3.55 June 3rd, 2011
+
+ [THINGS THAT MAY BREAK YOUR CODE]
+ url() was fixed to return "PATH_INFO" when it is explicitly requested
+ with either the path=>1 or path_info=>1 flag.
+
+ If your code is running under mod_rewrite (or compatible) and you are calling self_url() or
+ you are calling url() and passing path_info=>1, These methods will actually be
+ returning PATH_INFO now, as you have explicitly requested, or has self_url()
+ has requested on your behalf.
+
+ The PATH_INFO has been omitted in such URLs since the issue was introduced
+ in the 3.12 release in December, 2005.
+
+ This bug is so old your application may have come to depend on it or
+ workaround it. Check for application before upgrading to this release.
+
+ Examples of affected method calls:
+
+ $q->url(-absolute => 1, -query => 1, -path_info => 1 )
+ $q->url(-path=>1)
+ $q->url(-full=>1,-path=>1)
+ $q->url(-rewrite=>1,-path=>1)
+ $q->self_url();
+
Version 3.54, Apr 28, 2011
No code changes
Modified: trunk/libcgi-pm-perl/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libcgi-pm-perl/META.yml?rev=75505&op=diff
==============================================================================
--- trunk/libcgi-pm-perl/META.yml (original)
+++ trunk/libcgi-pm-perl/META.yml Sun Jun 12 13:33:32 2011
@@ -1,6 +1,6 @@
--- #YAML:1.0
name: CGI.pm
-version: 3.54
+version: 3.55
abstract: ~
author: []
license: unknown
@@ -19,7 +19,7 @@
- t
- inc
- t
-generated_by: ExtUtils::MakeMaker version 6.55_02
+generated_by: ExtUtils::MakeMaker version 6.56
meta-spec:
url: http://module-build.sourceforge.net/META-spec-v1.4.html
version: 1.4
Added: trunk/libcgi-pm-perl/debian/NEWS
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libcgi-pm-perl/debian/NEWS?rev=75505&op=file
==============================================================================
--- trunk/libcgi-pm-perl/debian/NEWS (added)
+++ trunk/libcgi-pm-perl/debian/NEWS Sun Jun 12 13:33:32 2011
@@ -1,0 +1,12 @@
+libcgi-pm-perl (3.55-1) UNRELEASED; urgency=low
+
+ [THINGS THAT MAY BREAK YOUR CODE]
+ url() was fixed to return "PATH_INFO" when it is explicitly requested
+ with either the path=>1 or path_info=>1 flag.
+
+ If your code is running under mod_rewrite (or compatible) and you are calling
+ self_url() or you are calling url() and passing path_info=>1, these methods
+ will actually be returning PATH_INFO now, as you have explicitly requested,
+ or has self_url() has requested on your behalf.
+
+ -- Alessandro Ghedini <al3xbio at gmail.com> Sun, 12 Jun 2011 15:16:47 +0200
Modified: trunk/libcgi-pm-perl/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libcgi-pm-perl/debian/changelog?rev=75505&op=diff
==============================================================================
--- trunk/libcgi-pm-perl/debian/changelog (original)
+++ trunk/libcgi-pm-perl/debian/changelog Sun Jun 12 13:33:32 2011
@@ -1,10 +1,16 @@
-libcgi-pm-perl (3.54-1) UNRELEASED; urgency=low
+libcgi-pm-perl (3.55-1) UNRELEASED; urgency=low
- IGNORE-VERSION: 3.54-1
+ [ Nicholas Bamber ]
+ * New upstream release 3.54
+ [ Alessandro Ghedini ]
* New upstream release
+ * Bump debhelper compat level to 8
+ * Add myself to Uploaders
+ * Add debian/NEWS to report incompatible changes
+ * Refresh patches
- -- Nicholas Bamber <nicholas at periapt.co.uk> Fri, 29 Apr 2011 00:17:13 +0100
+ -- Alessandro Ghedini <al3xbio at gmail.com> Sun, 12 Jun 2011 15:16:47 +0200
libcgi-pm-perl (3.53-1) unstable; urgency=low
@@ -55,8 +61,8 @@
* Update my email address.
[ Nicholas Bamber ]
- * Added myself to Uploaders
- * Upped standards version
+ * Added myself to Uploaders
+ * Upped standards version
* Removed quilt cruft
* Updated format of watch file to handle upstream change
* New upstream release
Modified: trunk/libcgi-pm-perl/debian/compat
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libcgi-pm-perl/debian/compat?rev=75505&op=diff
==============================================================================
--- trunk/libcgi-pm-perl/debian/compat (original)
+++ trunk/libcgi-pm-perl/debian/compat Sun Jun 12 13:33:32 2011
@@ -1,1 +1,1 @@
-7
+8
Modified: trunk/libcgi-pm-perl/debian/control
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libcgi-pm-perl/debian/control?rev=75505&op=diff
==============================================================================
--- trunk/libcgi-pm-perl/debian/control (original)
+++ trunk/libcgi-pm-perl/debian/control Sun Jun 12 13:33:32 2011
@@ -1,13 +1,14 @@
Source: libcgi-pm-perl
Section: perl
Priority: optional
-Build-Depends: debhelper (>= 7.0.50~)
+Build-Depends: debhelper (>= 8)
Build-Depends-Indep: perl, 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 debian.org>,
gregor herrmann <gregoa at debian.org>, Jonathan Yu <jawnsy at cpan.org>,
- Nicholas Bamber <nicholas at periapt.co.uk>
+ Nicholas Bamber <nicholas at periapt.co.uk>,
+ Alessandro Ghedini <al3xbio at gmail.com>
Standards-Version: 3.9.2
Homepage: http://search.cpan.org/dist/CGI.pm/
Vcs-Svn: svn://svn.debian.org/pkg-perl/trunk/libcgi-pm-perl/
Modified: trunk/libcgi-pm-perl/debian/patches/spelling.patch
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libcgi-pm-perl/debian/patches/spelling.patch?rev=75505&op=diff
==============================================================================
--- trunk/libcgi-pm-perl/debian/patches/spelling.patch (original)
+++ trunk/libcgi-pm-perl/debian/patches/spelling.patch Sun Jun 12 13:33:32 2011
@@ -6,7 +6,7 @@
Reviewed-by: Nicholas Bamber <nicholas at periapt.co.uk>
--- a/Changes
+++ b/Changes
-@@ -1200,7 +1200,7 @@
+@@ -1233,7 +1233,7 @@
21. Fixed warning in initialize_globals() under mod_perl.
22. File uploads from Macintosh versions of MSIE should now work.
23. Pragmas now preceded by dashes (-nph) rather than colons (:nph).
@@ -15,7 +15,7 @@
24. Can now pass arguments to all functions using {} brackets,
resolving historical inconsistencies.
25. Removed autoloader warnings about absent MultipartBuffer::DESTROY.
-@@ -1432,7 +1432,7 @@
+@@ -1465,7 +1465,7 @@
1. Added cookie() support routines.
2. Added -expires parameter to header().
@@ -24,7 +24,7 @@
4. Made the module more configurable for different operating systems.
5. Fixed a dumb bug in JavaScript button() method.
-@@ -1562,7 +1562,7 @@
+@@ -1595,7 +1595,7 @@
1. The user_agent() method is now documented;
2. A potential security hole in import() is now plugged.
@@ -73,7 +73,7 @@
<H3>Bug fixes in version 1.53</H3>
--- a/lib/CGI.pm
+++ b/lib/CGI.pm
-@@ -7950,7 +7950,7 @@
+@@ -7947,7 +7947,7 @@
=head2 Cgi-lib functions that are available in CGI.pm
Modified: trunk/libcgi-pm-perl/lib/CGI.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libcgi-pm-perl/lib/CGI.pm?rev=75505&op=diff
==============================================================================
--- trunk/libcgi-pm-perl/lib/CGI.pm (original)
+++ trunk/libcgi-pm-perl/lib/CGI.pm Sun Jun 12 13:33:32 2011
@@ -20,7 +20,7 @@
# The revision is no longer being updated since moving to git.
$CGI::revision = '$Id: CGI.pm,v 1.266 2009/07/30 16:32:34 lstein Exp $';
-$CGI::VERSION='3.54';
+$CGI::VERSION='3.55';
# HARD-CODED LOCATION FOR FILE UPLOAD TEMPORARY FILES.
# UNCOMMENT THIS ONLY IF YOU KNOW WHAT YOU'RE DOING.
@@ -2856,7 +2856,6 @@
my $query_str = $self->query_string;
my $rewrite_in_use = $request_uri && $request_uri !~ /^\Q$script_name/;
- undef $path if $rewrite_in_use && $rewrite; # path not valid when rewriting active
my $uri = $rewrite && $request_uri ? $request_uri : $script_name;
$uri =~ s/\?.*$//s; # remove query string
@@ -5653,9 +5652,7 @@
info probably won't match the request that the user sent. Set
-rewrite=>1 (default) to return URLs that match what the user sent
(the original request URI). Set -rewrite=>0 to return URLs that match
-the URL after mod_rewrite's rules have run. Because the additional
-path information only makes sense in the context of the rewritten URL,
--rewrite is set to false when you request path info in the URL.
+the URL after mod_rewrite's rules have run.
=back
Modified: trunk/libcgi-pm-perl/t/url.t
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libcgi-pm-perl/t/url.t?rev=75505&op=diff
==============================================================================
--- trunk/libcgi-pm-perl/t/url.t (original)
+++ trunk/libcgi-pm-perl/t/url.t Sun Jun 12 13:33:32 2011
@@ -1,9 +1,10 @@
use strict;
use warnings;
-use Test::More tests => 4; # last test to print
+use Test::More;
-use CGI qw/ :all /;
+use CGI ':all';
+
$ENV{HTTP_X_FORWARDED_HOST} = 'proxy:8484';
$ENV{SERVER_PROTOCOL} = 'HTTP/1.0';
@@ -21,3 +22,50 @@
is url() => 'http://proxy', 'url() with default port';
+subtest 'rewrite_interactions' => sub {
+ # Reference: RT#45019
+
+ local %ENV = (
+ # These two are always set
+ 'SCRIPT_NAME' => '/real/cgi-bin/dispatch.cgi',
+ 'SCRIPT_FILENAME' => '/home/mark/real/path/cgi-bin/dispatch.cgi',
+
+ # These two are added by mod_rewrite Ref: http://httpd.apache.org/docs/2.2/mod/mod_rewrite.html
+
+ 'SCRIPT_URL' => '/real/path/info',
+ 'SCRIPT_URI' => 'http://example.com/real/path/info',
+
+ 'PATH_INFO' => '/path/info',
+ 'REQUEST_URI' => '/real/path/info',
+ 'HTTP_HOST' => 'example.com'
+ );
+
+ my $q = CGI->new;
+
+ is(
+ $q->url( -absolute => 1, -query => 1, -path_info => 1 ),
+ '/real/path/info',
+ '$q->url( -absolute => 1, -query => 1, -path_info => 1 ) should return complete path, even when mod_rewrite is detected.'
+ );
+ is( $q->url(), 'http://example.com/real', '$q->url(), with rewriting detected' );
+ is( $q->url(-full=>1), 'http://example.com/real', '$q->url(-full=>1), with rewriting detected' );
+ is( $q->url(-path=>1), 'http://example.com/real/path/info', '$q->url(-path=>1), with rewriting detected' );
+ is( $q->url(-path=>0), 'http://example.com/real', '$q->url(-path=>0), with rewriting detected' );
+ is( $q->url(-full=>1,-path=>1), 'http://example.com/real/path/info', '$q->url(-full=>1,-path=>1), with rewriting detected' );
+ is( $q->url(-rewrite=>1,-path=>0), 'http://example.com/real', '$q->url(-rewrite=>1,-path=>0), with rewriting detected' );
+ is( $q->url(-rewrite=>1), 'http://example.com/real',
+ '$q->url(-rewrite=>1), with rewriting detected' );
+ is( $q->url(-rewrite=>0), 'http://example.com/real/cgi-bin/dispatch.cgi',
+ '$q->url(-rewrite=>0), with rewriting detected' );
+ is( $q->url(-rewrite=>0,-path=>1), 'http://example.com/real/cgi-bin/dispatch.cgi/path/info',
+ '$q->url(-rewrite=>0,-path=>1), with rewriting detected' );
+ is( $q->url(-rewrite=>1,-path=>1), 'http://example.com/real/path/info',
+ '$q->url(-rewrite=>1,-path=>1), with rewriting detected' );
+ is( $q->url(-rewrite=>0,-path=>0), 'http://example.com/real/cgi-bin/dispatch.cgi',
+ '$q->url(-rewrite=>0,-path=>1), with rewriting detected' );
+};
+
+
+done_testing();
+
+
More information about the Pkg-perl-cvs-commits
mailing list