Encoded words

Robert Grimm <[email protected]>
Newsgroups gmane.network.slrn.user
Organization Disorganized
Message-ID <[email protected]>
Hi all,

We had a discussion (starting with <[email protected]>; in
german) about (fake) encoded words in Message-Ids and I came to the
conclusion, that it would be the best to ignore headers,  for decoding,
where an encoded-word may not appear, because, even though it may look
like one, it is clearly not an encoded-word, but plain ascii.

Another problem that arose, are mail addresses. See
<[email protected]>, the mail address in From: is
<[email protected]>, but slrn shows
<dö[email protected]> and attempts to send a reply to that address.

#v+
[rob@woody:~]$ vrfy dö[email protected]
5.1.3 Syntax error in mailbox address "[email protected]"
(non-printable character)
d\C\[email protected] ... Service unavailable
[rob@woody:~]$ vrfy [email protected]
2.1.5 <[email protected]>
[rob@woody:~]$
#v-

What do you think? Is this a problem that is in need of a solution?

A simple solution for Message-Id: and References: would be to skip these
headers for decoding. See patch below.

diff -Naur slrn-pre1.0.0.orig/src/mime.c slrn-pre1.0.0/src/mime.c
--- slrn-pre1.0.0.orig/src/mime.c	2008-11-27 09:52:13.000000000 +0100
+++ slrn-pre1.0.0/src/mime.c	2009-03-17 16:08:46.000000000 +0100
@@ -498,6 +498,15 @@
 
    while ((line != NULL) && (line->flags & HEADER_LINE))
      {
+        if (0 == slrn_case_strncmp (line->buf,
+                               "Message-Id:", 11) ||
+            0 == slrn_case_strncmp (line->buf,
+                               "References:", 11))
+          {
+                line = line->next;
+                continue;
+          }
+
 	if (slrn_case_strncmp (line->buf,
 			       "Newsgroups:", 11) &&
 	    slrn_case_strncmp (line->buf,
Rob
-- 
It's funny there was no one left to notice
when they came for us.

------------------------------------------------------------------------------
Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are
powering Web 2.0 with engaging, cross-platform capabilities. Quickly and
easily build your RIAs with Flex Builder, the Eclipse(TM)based development
software that enables intelligent coding and step-through debugging.
Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.