From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/22129 Path: main.gmane.org!not-for-mail From: Dale Hagglund Newsgroups: gmane.emacs.gnus.general Subject: Re: nnmail-split-header-length-limit is EVIL! Date: 29 Mar 1999 22:05:25 -0800 Sender: owner-ding@hpc.uh.edu Message-ID: <863e2nikbe.fsf@ponoka.battleriver.com> References: <87sobotazh.fsf@pc-hrvoje.srce.hr> <87u2vxfn00.fsf@pc-hrvoje.srce.hr> <87k8whq4kx.fsf@pc-hrvoje.srce.hr> NNTP-Posting-Host: coloc-standby.netfonds.no Mime-Version: 1.0 X-Trace: main.gmane.org 1035160105 26538 80.91.224.250 (21 Oct 2002 00:28:25 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Mon, 21 Oct 2002 00:28:25 +0000 (UTC) Return-Path: Original-Received: from farabi.math.uh.edu (farabi.math.uh.edu [129.7.128.57]) by sclp3.sclp.com (8.8.5/8.8.5) with ESMTP id BAA27567 for ; Tue, 30 Mar 1999 01:11:47 -0500 (EST) Original-Received: from sina.hpc.uh.edu (lists@Sina.HPC.UH.EDU [129.7.3.5]) by farabi.math.uh.edu (8.9.1/8.9.1) with ESMTP id AAB06579; Tue, 30 Mar 1999 00:07:40 -0600 (CST) Original-Received: by sina.hpc.uh.edu (TLB v0.09a (1.20 tibbs 1996/10/09 22:03:07)); Tue, 30 Mar 1999 00:07:44 -0600 (CST) Original-Received: from sclp3.sclp.com (root@sclp3.sclp.com [204.252.123.139]) by sina.hpc.uh.edu (8.7.3/8.7.3) with ESMTP id AAA02398 for ; Tue, 30 Mar 1999 00:07:35 -0600 (CST) Original-Received: from proxy4.ba.best.com (root@proxy4.ba.best.com [206.184.139.15]) by sclp3.sclp.com (8.8.5/8.8.5) with ESMTP id BAA27542 for ; Tue, 30 Mar 1999 01:07:27 -0500 (EST) Original-Received: from best.com (dynamic62.pm04.pleasanton.best.com [204.156.131.254]) by proxy4.ba.best.com (8.9.3/8.9.2/best.out) with ESMTP id WAA08972 for ; Mon, 29 Mar 1999 22:05:55 -0800 (PST) Original-Received: (from rdh@localhost) by best.com (8.8.5/8.8.5) id WAA10970; Mon, 29 Mar 1999 22:05:32 -0800 (PST) Original-To: ding@gnus.org In-Reply-To: Lars Magne Ingebrigtsen's message of "28 Mar 1999 17:09:59 +0200" Original-Lines: 29 User-Agent: Gnus/5.070066 (Pterodactyl Gnus v0.66) Emacs/20.3 Precedence: list X-Majordomo: 1.94.jlt7 Xref: main.gmane.org gmane.emacs.gnus.general:22129 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:22129 Lars Magne Ingebrigtsen writes: > Oh, I had forgotten that. Yes, there were two problems with the > long lines -- the regexp could either overflow, or it could just > take forever to run. I've now reverted to removing the lines again. This slightly crazy idea just occurred to me. Say the max header limit is 500, and some particular header line is, say, 1700 bytes. What about matching the line against the split regexps in *overlapping substrings* of at most 500 bytes each? Each substring overlaps the end of the previous chunk by, for example, 100 bytes. You'd have to have some code to combine the split-results from each substring, but that shouldn't be so hard. I can't think that split strings depend in practice on matching a substring longer than 100 bytes, but the ovelap amount could be controlled by a variable as well. Naturally, this whole slightly weird behaviour should probably be controlled by yet another variable. This might allow gnus to handle arbitrarily long header lines in a more-or-less natural fashion without falling victim to the odd pathological regular expression. Is there something stupid I'm missing here? Does anyone use split regexps that would fail to work properly in this scheme? Dale.