filter_innd: Correctly read folded headers.
Signed-off-by: Thomas Hochstein <thh@thh.name>
This commit is contained in:
		
							parent
							
								
									121fcbc15f
								
							
						
					
					
						commit
						0ed9a8166d
					
				
					 1 changed files with 5 additions and 2 deletions
				
			
		| 
						 | 
				
			
			@ -1,4 +1,4 @@
 | 
			
		|||
# vim: set syntax=perl ts=4 ai si:
 | 
			
		||||
# vim: set tabstop=4 shiftwidth=4 expandtab syntax=perl:
 | 
			
		||||
 | 
			
		||||
use MIME::Base64();
 | 
			
		||||
use Digest::SHA();
 | 
			
		||||
| 
						 | 
				
			
			@ -36,10 +36,13 @@ sub verify_cancel($$$) {
 | 
			
		|||
   for my $line(split(/\s*\n/, $headers))    {
 | 
			
		||||
      if ($line =~ m/^([[:alnum:]-]+):\s+(.*)/) {
 | 
			
		||||
         $headers{$1} = $2;
 | 
			
		||||
         $lastkey = $1;
 | 
			
		||||
      } elsif ($line =~ m/^\s+(.*)/ and defined($lastkey)) {
 | 
			
		||||
         $headers{$lastkey} .= ' ' . $1;
 | 
			
		||||
      }
 | 
			
		||||
   }
 | 
			
		||||
 | 
			
		||||
   my $lock = $headers{'Cancel-Lock'};
 | 
			
		||||
 | 
			
		||||
   if (defined($lock)) {
 | 
			
		||||
      my $key = $r_hdr->{'Cancel-Key'} || return "$descr of $target without Cancel-Key";
 | 
			
		||||
      #return verify_cancel_key($key, $lock, ' target=' . $target);
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue