[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Source code for "reply via email" on lists.gnu.org
From: |
Ian Kelling |
Subject: |
Re: Source code for "reply via email" on lists.gnu.org |
Date: |
Wed, 13 May 2020 12:05:20 -0400 |
User-agent: |
mu4e 1.3.6; emacs 28.0.50 |
Ian Kelling <address@hidden> writes:
> Florian Bruhin <address@hidden> writes:
>
>> (The reason I'm asking is because I believe there is a bug in the script: It
>> does not surround the mail in the In-Reply-To header with <...>, causing e.g.
>> NeoMutt to ignore the invalid mail address in the header)
>>
>> Florian
>
>
>
> I dropped webmasters.
>
> The script was written in 2002 and has't been touched. Generally its an
> oversight that it hasn't been published. Ill make a repo for it when the
> FSF opens its upcoming forge. Patches welcome
>
>
> from mod_python import apache, util
> from urllib import quote
>
> def handler (req):
> if req.method != 'POST' or \
> not req.headers_in.has_key ('content-type') or \
> req.headers_in['content-type'][:10] != 'multipart/':
> return apache.HTTP_NOT_FOUND
>
> form = util.FieldStorage (req)
> if form.has_key ('a') and form.has_key ('b') and \
> form.has_key ('c') and form.has_key ('d'):
> req.headers_out.add ('Location',
> 'mailto:%s@%s?In-Reply-To=%s&Subject=%s' \
> % (quote(form['a']), quote(form['c']),
> quote(form['d']), quote(form['b'])))
>
> return apache.HTTP_MOVED_TEMPORARILY
>
> return apache.HTTP_NOT_FOUND
I should have said, licensed apache 2.0 since its so small.