Inews and long headers
Julien ÉLIE
julien at trigofacile.com
Sat Jul 8 15:04:04 UTC 2017
Hi Kamil,
>>> Now I have problem with lines
>>>
>>> --8<---------------cut here---------------start------------->8---
>>> Header-name:
>>> aaaaa
>>> --8<---------------cut here---------------end--------------->8---
>>> but I am not sure if this is properly formatted line.
>>
>> Header-name:\r\n aaaaa\r\n
>> is malformatted. A space is needed after the colon.
>
> Roma locuta, causa finita. :)
It is not a fatality :)
This format is not allowed at injection time (inews), which does not
mean it cannot be fixed at posting time (mailpost).
mailpost should convert mails to valid Netnews articles. It already
adds a space after the colon, so I believe the issue in your above
example is in fact an empty header line (the first line, without any
non-whitespace chars in header body).
Something like this could work. (Not tested.)
--- mailpost.in (révision 10159)
+++ mailpost.in (copie de travail)
@@ -224,6 +224,11 @@
next;
}
+ # Remove empty header lines within header body.
+ s/\n[ \t]+\n/\n/g; # middle
+ s/\n[ \t]+$//; # last line
+ s/^([^:]+):[ \t]+\n/$1/; # first line
+
if (/^($exclude):\s*/sio) {
$real_news_hdrs .= "$_\n";
next;
Of course, if you have a better patch, do not hesitate to share.
--
Julien ÉLIE
« Je n'aime pas faire du char-stop ! » (Astérix)
More information about the inn-workers
mailing list