ports/138349: [PATCH] Fixing a bug in www/p5-HTTP-Recorder

Ashish SHUKLA wahjava at gmail.com
Sun Aug 30 15:30:03 UTC 2009


>Number:         138349
>Category:       ports
>Synopsis:       [PATCH] Fixing a bug in www/p5-HTTP-Recorder
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sun Aug 30 15:30:02 UTC 2009
>Closed-Date:
>Last-Modified:
>Originator:     Ashish SHUKLA
>Release:        FreeBSD 8.0-BETA3 amd64
>Organization:
N/A
>Environment:
System: FreeBSD chateau.d.lf 8.0-BETA3 FreeBSD 8.0-BETA3 #0: Sat Aug 22 02:00:45 UTC 2009 root at mason.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC amd64


>Description:
The attached diff fixes a bug present in HTTP::Recorder module since 2007. The solution 
is also discussed on public mailing list[1][2].

[1] - http://lists.fsck.com/pipermail/http-recorder/2007-October/000083.html
[2] - http://cpanratings.perl.org/user/bwagner
>How-To-Repeat:
>Fix:
diff -urN /usr/ports/www/p5-HTTP-Recorder/Makefile p5-HTTP-Recorder/Makefile
--- /usr/ports/www/p5-HTTP-Recorder/Makefile	2009-08-18 05:38:44.000000000 +0530
+++ p5-HTTP-Recorder/Makefile	2009-08-30 20:44:02.000000000 +0530
@@ -7,6 +7,7 @@
 
 PORTNAME=	HTTP-Recorder
 PORTVERSION=	0.05
+PORTREVISION=	1
 CATEGORIES=	www perl5
 MASTER_SITES=	CPAN
 MASTER_SITE_SUBDIR=	../by-authors/id/L/LE/LEIRA
@@ -24,4 +25,7 @@
 
 MAN3=		HTTP::Recorder.3
 
+post-patch:
+	${RM} -f ${WRKSRC}/lib/HTTP/Recorder.pm.orig
+
 .include <bsd.port.mk>
diff -urN /usr/ports/www/p5-HTTP-Recorder/files/patch-lib_HTTP_Recorder.pm p5-HTTP-Recorder/files/patch-lib_HTTP_Recorder.pm
--- /usr/ports/www/p5-HTTP-Recorder/files/patch-lib_HTTP_Recorder.pm	1970-01-01 05:30:00.000000000 +0530
+++ p5-HTTP-Recorder/files/patch-lib_HTTP_Recorder.pm	2009-08-30 20:41:54.000000000 +0530
@@ -0,0 +1,25 @@
+
+$FreeBSD$
+
+--- lib/HTTP/Recorder.pm.orig
++++ lib/HTTP/Recorder.pm
+@@ -344,12 +344,13 @@
+     # get rid of the arguments we added
+     my $prefix = $self->{prefix};
+ 
+-    for my $key ($content->query_param) {
+-	if ($key =~ /^$prefix-/) {
+-	    $content->query_param_delete($key);
+-	}
+-    }
+-    return $content;
++	$content =~ s/$prefix-(.*?)\?(.*?)&//g;
++	$content =~ s/$prefix-(.*?)&//g;
++	$content =~ s/$prefix-(.*?)$//g;
++	$content =~ s/&$//g;
++	$content =~ s/\?$//g;
++
++	return $content;
+ }
+ 
+ sub extract_values {
>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the freebsd-ports-bugs mailing list