Dup. header fix in mailpost

Steve Campbell steve at avalon.Dartmouth.EDU
Mon Feb 21 16:54:41 UTC 2000


Folks,

I noticed that mailpost was not catching duplicate headers if the header names 
were in different cases. For example

MIME-Version
and
Mime-version

were not being recognized as duplicates. The simple patch below fixes this.

						Steve Campbell
						Dartmouth College

-------
*** samples/mailpost.in.orig	Tue May 11 17:53:00 1999
--- samples/mailpost.in	Mon Feb 21 11:49:33 2000
***************
*** 1,6 ****
--- 1,7 ----
  #!@_PATH_PERL@
  
  # mailpost - yet another mail-to-news filter
+ # 21feb00 [added "lc" to duplicate header fixer stmt to make it 
case-insensitive]
  # doka 11may99 [fixed duplicate headers problem]
  # brister 19oct98 cleaned up somewhat for perl v. 5. and made a little more 
robust.
  # vixie 29jan95 RCS'd [$Id: mailpost.in,v 1.1.2.3 1999/05/11 21:53:00 kondou 
Exp $]
***************
*** 261,267 ****
  
  # Remove duplicate headers.
  my %headers = ();
! $real_news_hdrs =~ s/((.*?:) .*?($|\n)([ \t]+.*?($|\n))*)/$headers{$2}++?"":"
$1"/ges;
  
  # Inews writes error messages to stdout. We want to capture those and mail
  # them back to the newsmaster. Trying to write and read from a subprocess is 
--- 262,268 ----
  
  # Remove duplicate headers.
  my %headers = ();
! $real_news_hdrs =~ s/((.*?:) .*?($|\n)([ \t]+.*?($|\n))*)/$headers{lc 
$2}++?"":"$1"/ges;
  
  # Inews writes error messages to stdout. We want to capture those and mail
  # them back to the newsmaster. Trying to write and read from a subprocess is 





More information about the inn-bugs mailing list