Patch for big message-ids from googlegroups

Jörg Sommer <[email protected]>
Newsgroups gmane.network.slrn.user
Message-ID <[email protected]>
Hi John,

would you apply this patch? I've got a bug report, but I don't like the
patch there, because it disables the whole check.

    Workaround for long Message‐IDs from googlegroups.com
    
    Google Groups creates Message‐IDs they lead to an overlong
    References: line which can't get folded. Slrn complains about this,
    because it's a violation of the RFC, but we have to keep the
    Message‐ID as is. Users feel annoyed by this message, so make an
    exception for googlegroups.com.

diff --git a/src/mime.c b/src/mime.c
index d36568c..9d11e8f 100644
--- a/src/mime.c
+++ b/src/mime.c
@@ -1238,7 +1238,12 @@ static Slrn_Mime_Error_Obj *fold_line (char **s_ptr)/*{{{*/
    s = skip_non_ascii_whitespace (s, smax);
    
    line_len = s - s0;
-   if (line_len >= MAX_CONTINUED_HEADER_SIZE)
+   /* Google Groups uses big message IDs they lead to overlong lines. But we
+    * can't fold these lines, because we must keep the message ID as is.
+    */
+   if (line_len >= MAX_CONTINUED_HEADER_SIZE
+       && (0 != slrn_case_strncmp(s0, "references:", 11)
+           || 0 != slrn_case_strncmp(s - 17, "googlegroups.com>", 17)))
      long_words++;
 
    if (NULL == (folded_text = slrn_strnmalloc (s0, line_len, 1)))

Bye, Jörg.
-- 
The social dynamics of the net are a direct consequence of the fact
that nobody has yet developed a Remote Strangulation Protocol.
            (Larry Wall)

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
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.