r70809 - in /branches/upstream/libhttp-parser-perl/current: Changes META.yml Parser.pm t/1.t
jawnsy-guest at users.alioth.debian.org
jawnsy-guest at users.alioth.debian.org
Mon Mar 7 23:56:19 UTC 2011
Author: jawnsy-guest
Date: Mon Mar 7 23:56:12 2011
New Revision: 70809
URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=70809
Log:
[svn-upgrade] new version libhttp-parser-perl (0.06)
Modified:
branches/upstream/libhttp-parser-perl/current/Changes
branches/upstream/libhttp-parser-perl/current/META.yml
branches/upstream/libhttp-parser-perl/current/Parser.pm
branches/upstream/libhttp-parser-perl/current/t/1.t
Modified: branches/upstream/libhttp-parser-perl/current/Changes
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libhttp-parser-perl/current/Changes?rev=70809&op=diff
==============================================================================
--- branches/upstream/libhttp-parser-perl/current/Changes (original)
+++ branches/upstream/libhttp-parser-perl/current/Changes Mon Mar 7 23:56:12 2011
@@ -1,4 +1,7 @@
Revision history for Perl extension HTTP::Parser.
+
+0.06 2011-03-06
+ - fix by frodwith for rt.cpan.org #66298 (path string parsing)
0.05 2009-11-13
- two fixes by David Cannings <david at edeca.net>
Modified: branches/upstream/libhttp-parser-perl/current/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libhttp-parser-perl/current/META.yml?rev=70809&op=diff
==============================================================================
--- branches/upstream/libhttp-parser-perl/current/META.yml (original)
+++ branches/upstream/libhttp-parser-perl/current/META.yml Mon Mar 7 23:56:12 2011
@@ -1,6 +1,6 @@
--- #YAML:1.0
name: HTTP-Parser
-version: 0.05
+version: 0.06
abstract: parse HTTP/1.1 request into HTTP::Request/Response object
author:
- David. B. Robins <dbrobins at davidrobins.net>
Modified: branches/upstream/libhttp-parser-perl/current/Parser.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libhttp-parser-perl/current/Parser.pm?rev=70809&op=diff
==============================================================================
--- branches/upstream/libhttp-parser-perl/current/Parser.pm (original)
+++ branches/upstream/libhttp-parser-perl/current/Parser.pm Mon Mar 7 23:56:12 2011
@@ -35,7 +35,7 @@
package HTTP::Parser;
-our $VERSION = '0.05';
+our $VERSION = '0.06';
use HTTP::Request;
use HTTP::Response;
@@ -260,6 +260,12 @@
unless $http and $http =~ /^HTTP\/(\d+)\.(\d+)$/i;
($major,$minor) = ($1,$2);
die 'HTTP requests not allowed' unless $self->{request};
+
+ # If the Request-URI is an abs_path, we need to tell URI that we don't
+ # know the scheme, otherwise it will misinterpret paths that start with
+ # // as being scheme-relative uris, and will interpret the first
+ # component after // as the host (see rfc 2616)
+ $uri = "//$uri" if $uri =~ m(^/);
$obj = $self->{obj} = HTTP::Request->new($method, URI->new($uri));
}
Modified: branches/upstream/libhttp-parser-perl/current/t/1.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libhttp-parser-perl/current/t/1.t?rev=70809&op=diff
==============================================================================
--- branches/upstream/libhttp-parser-perl/current/t/1.t (original)
+++ branches/upstream/libhttp-parser-perl/current/t/1.t Mon Mar 7 23:56:12 2011
@@ -4,7 +4,7 @@
#########################
use strict;
-use Test::More tests => 21;
+use Test::More tests => 22;
# <1>
BEGIN { use_ok('HTTP::Parser') };
@@ -77,3 +77,7 @@
is($res->content, "Some content!\x0d\x0a", 'content is correct');
}
+# <1>
+$parser = HTTP::Parser->new(request => 1);
+$parser->add("GET //foo///bar/baz HTTP/1.1\x0d\x0a\x0d\x0a");
+is $parser->request->uri->path, '//foo///bar/baz';
More information about the Pkg-perl-cvs-commits
mailing list