Re: [pgsql-www] Further UTF8/MIME fixes for the commitfest app - Mailing list pgsql-www

From ilmari@ilmari.org (Dagfinn Ilmari Mannsåker)
Subject Re: [pgsql-www] Further UTF8/MIME fixes for the commitfest app
Date
Msg-id d8jr3200zy4.fsf@dalvik.ping.uio.no
Whole thread Raw
In response to Re: [pgsql-www] Further UTF8/MIME fixes for the commitfest app  (Magnus Hagander <magnus@hagander.net>)
Responses Re: [pgsql-www] Further UTF8/MIME fixes for the commitfest app
List pgsql-www
Magnus Hagander <magnus@hagander.net> writes:

> On Wed, Mar 1, 2017 at 5:35 PM, Dagfinn Ilmari Mannsåker <ilmari@ilmari.org>
> wrote:
[…]
>> #2 MIME-decodes headers received from the mailing list archive JSON API
>>
>> I haven't been able to talk to the JSON api, so I couldn't test them
>> properly, but I did some stand-alone testing of the code snippets.
>>
>> Note that the MIME decoding only works properly if running under Python
>> 3; the Python 2 version of email.header.decode_header() has broken
>> detection of the end of encoded-words.
>
> Is the patch still an improvement on python2?

No, because it'd be affected by the same problem that causes the
undecoded headers to be returned from the archive app.

> Also, based on your other email about the list archives -- if we fix this
> in the archives, does that make this patch unnecessary?

Yes, this patch is unnecessary if the archive app is fixed, and
insufficient if the commitfest app isn't upgraded to python3.

One possible workaround until upgrading to python3 is feasible would be
for the archive app to do some more munging (akin to the existing
_re_mailworkaround), and inject a space between an encoded-word and an
immediately-adjacent opening/closing paren.


- ilmari

-- 
"The surreality of the universe tends towards a maximum" -- Skud's Law
"Never formulate a law or axiom that you're not prepared to live withthe consequences of."
--Skud's Meta-Law
 



pgsql-www by date:

Previous
From: Tom Lane
Date:
Subject: [pgsql-www] buildfarm git references pointing at github?
Next
From: Andrew Dunstan
Date:
Subject: Re: [pgsql-www] buildfarm git references pointing at github?