Skip to content

Commit

Permalink
r55203@onn: sartak | 2008-05-07 04:19:48 -0400
Browse files Browse the repository at this point in the history
 Make the header parser regex comply with RFC 2616


git-svn-id: svn://svn.bestpractical.com/HTTP-Server-Simple@12129 e417ac7c-1bcc-0310-8ffa-8f5827389a85
  • Loading branch information
sartak committed May 7, 2008
1 parent fd38c1d commit ba0b5ba
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/HTTP/Server/Simple.pm
Expand Up @@ -636,7 +636,7 @@ sub parse_headers {
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 =~ /^$/ );
Expand Down

0 comments on commit ba0b5ba

Please sign in to comment.