in reply to Email Header

Try using this instead if it helps.
read(STDIN, $buffer, $ENV{'CONTENT_LENGTH'}); @pairs = split(/&/, $buffer); foreach $pair (@pairs) { ($names, $value) = split(/=/, $pair); $value =~ tr/+/ /; $value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg; if ($INPUT{$names}) { $INPUT{$names} = $INPUT{$names}.",".$val +ue; } else { $INPUT{$names} = $value; } }

Replies are listed 'Best First'.
Re: Re: Email Header
by chromatic (Archbishop) on Nov 16, 2001 at 00:12 UTC
    That's a rather broken CGI-parameter POST reader, not an RFC 822 email message header parser. It probably won't help. :)

    On a side note, as that snippet has several flaws visible in ten seconds (does not verify the content length, is subject to large POST denial of service attacks, does not appear to handle properly encoded entities, ignores the valid ';' separator for form values, and does not allow '0' as a valid form value), I would advise against using it even when accepting CGI parameters. use CGI or die; offers a better suggestion.