[Catalyst-commits] r7455 - in trunk/HTTP-Body: . lib/HTTP
lib/HTTP/Body
andyg at dev.catalyst.perl.org
andyg at dev.catalyst.perl.org
Sat Feb 23 16:15:19 GMT 2008
Author: andyg
Date: 2008-02-23 16:15:18 +0000 (Sat, 23 Feb 2008)
New Revision: 7455
Modified:
trunk/HTTP-Body/Changes
trunk/HTTP-Body/lib/HTTP/Body.pm
trunk/HTTP-Body/lib/HTTP/Body/UrlEncoded.pm
Log:
HTTP::Body 1.01, fixed regex to restore performance of urlencoded parser, the previous version was about 3x slower
Modified: trunk/HTTP-Body/Changes
===================================================================
--- trunk/HTTP-Body/Changes 2008-02-23 16:01:45 UTC (rev 7454)
+++ trunk/HTTP-Body/Changes 2008-02-23 16:15:18 UTC (rev 7455)
@@ -1,5 +1,8 @@
This file documents the revision history for Perl extension HTTP::Body.
+1.01 2008-02-23 11:30:00
+ - Fixed performance issue with urlencoded regex.
+
1.00 2008-02-23 11:00:00
- Added support for chunked requests if no $length value is passed to new().
- Added support for XForms submissions. (Daniel Ruoso)
Modified: trunk/HTTP-Body/lib/HTTP/Body/UrlEncoded.pm
===================================================================
--- trunk/HTTP-Body/lib/HTTP/Body/UrlEncoded.pm 2008-02-23 16:01:45 UTC (rev 7454)
+++ trunk/HTTP-Body/lib/HTTP/Body/UrlEncoded.pm 2008-02-23 16:15:18 UTC (rev 7455)
@@ -45,7 +45,7 @@
# Note: s/// appears faster than tr///
$self->{buffer} =~ s/\+/ /g;
- for my $pair ( split( /&|;(?:\s+)?/, $self->{buffer} ) ) {
+ for my $pair ( split( /[&;](?:\s+)?/, $self->{buffer} ) ) {
my ( $name, $value ) = split( /=/, $pair , 2 );
Modified: trunk/HTTP-Body/lib/HTTP/Body.pm
===================================================================
--- trunk/HTTP-Body/lib/HTTP/Body.pm 2008-02-23 16:01:45 UTC (rev 7454)
+++ trunk/HTTP-Body/lib/HTTP/Body.pm 2008-02-23 16:15:18 UTC (rev 7455)
@@ -4,7 +4,7 @@
use Carp qw[ ];
-our $VERSION = '1.00';
+our $VERSION = '1.01';
our $TYPES = {
'application/octet-stream' => 'HTTP::Body::OctetStream',
More information about the Catalyst-commits
mailing list