Skip to content

Commit

Permalink
Don't die on no header vals.
Browse files Browse the repository at this point in the history
git-svn-id: http://maatkit.googlecode.com/svn/trunk@5121 dfb901c2-3250-0410-b216-0b33211c9131
  • Loading branch information
daniel@percona.com committed Nov 14, 2009
1 parent b74fbc9 commit 9911a37
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions common/HTTPProtocolParser.pm
Expand Up @@ -204,6 +204,10 @@ sub _parse_header {
MKDEBUG && _d('HTTP header:', $line1);
return unless $line1;

if ( !$header_vals ) {
MKDEBUG && _d('No header vals');
return $line1, undef;
}
my @headers;
foreach my $val ( split(/\r\n/, $header_vals) ) {
last unless $val;
Expand Down

0 comments on commit 9911a37

Please sign in to comment.