Mike Glover <
[email protected]> writes:
But, still, what's the benefit to treating \r as folding whitespace in
this case?
It's not. It uses ISWHITE for folding whitespace, which only accepts \t
and space.
The problem is that it's not recognizing a line consisting of \r\n as a
blank line because of this check at the end of StripOffHeaders:
/* Get start of next header; if it's a blank line, we hit the end. */
p = NextHeader(p);
if (*p == '\n')
break;
*p is \r here, so it thinks there's another header. I think it then tries
to parse \r\n as a header line and then errors out because there's no
colon. It was clearly never tested with CRLF line endings.
It may make sense to check if the first line of the input ends in \r\n
and, if so, call wire_to_native on the input buffer before processing it.
inews isn't really designed to accept arbitrary line endings, but it looks
easy enough to make it compatible with CRLF line endings.
--
Russ Allbery (
[email protected]) <
https://www.eyrie.org/~eagle/>
Please post questions rather than mailing me directly.
<
https://www.eyrie.org/~eagle/faqs/questions.html> explains why.
--- SoupGate-Win32 v1.05
* Origin: fsxNet Usenet Gateway (21:1/5)