[Bps-public-commit] r12129 - in HTTP-Server-Simple: .
sartak at bestpractical.com
sartak at bestpractical.com
Wed May 7 04:19:53 EDT 2008
Author: sartak
Date: Wed May 7 04:19:53 2008
New Revision: 12129
Modified:
HTTP-Server-Simple/ (props changed)
HTTP-Server-Simple/lib/HTTP/Server/Simple.pm
Log:
r55203 at onn: sartak | 2008-05-07 04:19:48 -0400
Make the header parser regex comply with RFC 2616
Modified: HTTP-Server-Simple/lib/HTTP/Server/Simple.pm
==============================================================================
--- HTTP-Server-Simple/lib/HTTP/Server/Simple.pm (original)
+++ HTTP-Server-Simple/lib/HTTP/Server/Simple.pm Wed May 7 04:19:53 2008
@@ -636,7 +636,7 @@
while ( sysread( STDIN, my $buff, 1 ) ) {
if ( $buff eq "\n" ) {
$chunk =~ s/[\r\l\n\s]+$//;
- if ( $chunk =~ /^([\w\-]+): (.+)/i ) {
+ if ( $chunk =~ /^([^()<>\@,;:\\"\/\[\]?={} \t]+):\s*(.*)/i ) {
push @headers, $1 => $2;
}
last if ( $chunk =~ /^$/ );
More information about the Bps-public-commit
mailing list