1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-23 00:43:28 +00:00

- Add a patch to fix the parsing of HTTP messages in case they contain

X-Meta field names

Submitted by:	Cyril Nguyen Huu <cyril@ci0.org> (via private email)
Obtained from:	OpenBSD
Approved by:	portmgr (bapt)
This commit is contained in:
Frederic Culot 2013-04-09 06:31:08 +00:00
parent 5e99e7322a
commit be6f440e05
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=315769
2 changed files with 15 additions and 1 deletions

View File

@ -3,7 +3,7 @@
PORTNAME= HTTP-Message
PORTVERSION= 6.06
PORTREVISION= 1
PORTREVISION= 2
CATEGORIES= www perl5
MASTER_SITES= CPAN
PKGNAMEPREFIX= p5-
@ -32,4 +32,7 @@ MAN3= HTTP::Config.3 \
HTTP::Response.3 \
HTTP::Status.3
post-patch:
@${RM} ${WRKSRC}/lib/HTTP/Headers.pm.orig
.include <bsd.port.mk>

View File

@ -0,0 +1,11 @@
--- lib/HTTP/Headers.pm.orig 2013-04-08 11:36:07.000000000 -0400
+++ lib/HTTP/Headers.pm 2013-04-08 11:42:27.000000000 -0400
@@ -150,7 +150,7 @@
my($self, $field, $val, $op) = @_;
Carp::croak("Illegal field name '$field'")
- if rindex($field, ':') > 1 || !length($field);
+ if ( $field !~ /^X-Meta/ && rindex($field, ':') > 1) || !length($field);
unless ($field =~ /^:/) {
$field =~ tr/_/-/ if $TRANSLATE_UNDERSCORE;