> Actual bugs are; > > 1-1. elmo-msgdb-get-message-id-from-buffer assumes buffer is narrowed > to a message header, but actually it is called from unnarrowed buffer > in some places. > > 1-2. We have multiple extracting methods for Message-ID and they can't > extract from some valid header. (snip) > Fix (my opinion); (snip) > 1-2. David's refactoring is efficient. As far as I tested, no major > performance problem was observed except using lexical analyzer. So, > if I can customize to disable lexical analyzer in this part, the most > strict method (such as the combination of lexical analyzer and strict > regexp in [wl-en: 05189]) would be permissive. I wrote the patch to fix 1-2. It is basically based on David's refactoring. There are two steps for extracting Message-ID. At first, more strict regexp matching is tested. Some valid headers, e.g. with comment, whould slip out of this test. But second step which uses lexical analyzer could pick them up. Because almost headers would be extracted in first step, I think there are little performance problem and no custamization for disabling lexical analyzer is needed. The extracting function accepts optional arguments to adjust the beavior for the case that header is invalid or strict Message-ID extracting is required. But the changes of elmo-nntp.el are not tested, sorry. -- Kazuhiro Ito
Attachment:
msgid.diff
Description: Binary data