Article View: news.software.nntp
Article #19419Re: Filtering message body (was Re: Posting sux!! so does INN)
From: Jeff Garzik
Date: Sun, 20 Jul 1997 00:00
Date: Sun, 20 Jul 1997 00:00
29 lines
1857 bytes
1857 bytes
Jeremy wrote: > Jeff Garzik <jeff.garzik@spinne.com> wrote: > >heh. Here's patch to INN 1.5.1 that will make the message body > >accessible to the Perl filter. > How is it on resources? *shrug* It hasn't blown up my test server, but I haven't tested it on my news hub (which runs Diablo). The principle is simple enough -- pass a pointer to the article body from INN to Perl, which simply references it (instead of copying). There don't seem to be memory leaks on my test server, but it only has a partial feed (news.*). Two comments. Don't forget to use the multi-line regex modifier when doing string matching on the body (/pattern/m). And what happens when an 8-bit article, with possible embedded NULLs, comes along? Your guess is as good as mine. If you come up with some cool duplicate-body code and don't see any memory leaks in my patch, post it here, or maybe let me incorporate it into my Perl filter. -- Jeff Garzik Quality news feeds News Administrator INN Technical info, Consulting Spinne, Inc. http://www.spinne.com/usenet/
Technical Details
Message-ID:
<33D1AA36.5DCC63EE@spinne.com>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.mbox.zip!not-for-mailReferences:
<33d0477a.8926553@code.ripco.com> <slrn5t1oii.nml.streiner@lurch.bv.sgi.net> <000033D150E0.NO_UCE@mauve.demon.co.uk> <33D1597E.6F89575E@spinne.com> <5qs7n1$cpc$1@news1.exit109.com>Show Full Headers
Complete Article Headers
Message-ID: <33D1AA36.5DCC63EE@spinne.com> Subject: Re: Filtering message body (was Re: Posting sux!! so does INN) Date: Sun, 20 Jul 1997 00:00:00 +0000 From: Jeff Garzik <jeff.garzik@spinne.com> References: <33d0477a.8926553@code.ripco.com> <slrn5t1oii.nml.streiner@lurch.bv.sgi.net> <000033D150E0.NO_UCE@mauve.demon.co.uk> <33D1597E.6F89575E@spinne.com> <5qs7n1$cpc$1@news1.exit109.com> Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.mbox.zip!not-for-mail X-Deja-AN: 257807517 To: Jeremy <jeremy@exit109.com> Organization: Spinne http://spinne.com Newsgroups: news.software.nntp