Re: archive not showing all attachements

Поиск
Список
Период
Сортировка
От Magnus Hagander
Тема Re: archive not showing all attachements
Дата
Msg-id CABUevEwEw35g7n3peoqmpWraQuRvounck7puDUWU-S-=yfsoEA@mail.gmail.com
обсуждение исходный текст
Ответ на Re: archive not showing all attachements  ("Jonathan S. Katz" <jkatz@postgresql.org>)
Ответы Re: archive not showing all attachements
Re: archive not showing all attachements
Re: archive not showing all attachements
Список pgsql-www
On Thu, Mar 24, 2022 at 9:18 PM Jonathan S. Katz <jkatz@postgresql.org> wrote:
>
> On 3/24/22 3:24 PM, Andres Freund wrote:
> > Hi,
> >
> > In a recent email Horiguchi-san attached an incremental patch as .txt,
> > presumably to avoid confusing cfbot. I just noticed that the archives don't
> > offer a download link:
> > https://www.postgresql.org/message-id/20220323.163833.1929400812667041796.horikyota.ntt%40gmail.com
> >
> > but in my mail reader it's perfectly visible.
> >
> > I don't know if it's caused by the file ending or Horiguchi-san's email client
> > using text/Plain rather than text/plain. As far as I understand mime types are
> > supposed to be case insensitive, so text/Plain is perfectly correct, albeit a
> > little unusual.
>
> I ran into a similar issue while using Mac mail, where attached patches
> wouldn't post to the archives. I switched to Thunderbird solely for
> posting to the mailing lists.
>
> That said, that may be a thread worth pulling. It looks like we do
> case-sensitivity checking on the MIME type based on the
> "get_content_type" docs[1][2].
>
> If you have the raw message, it may be good to manually run through the
> code and see what's happening in the the "recursive_get_attachments" to
> see root cause and potentially fix this.

There is a link to the raw message directly from that page in the
archives, remember? :)

That said, it's not as simple as a upper/lowercase. get_content_type()
returns 'text/plain' in lowercase for both parts so it takes care of
that.

The problem is that:
1. It's not an attachment. That is:
Content-Disposition: inline; filename="0001-doc_wip-diff.txt"
explicitly says it's not an attachment.

So the reason it's not listed as an attachment (per the subject of the
email) is because it *isn't* an attachment.


2. We only show the first plaintext part of messages

This is the actual problem. Our archives don't know how to merge
multiple plaintext parts when they are set to be viewed inline and not
as attachments.

That said, I notice that it's shown as an attachment in gmail as well,
even though it's not an attachment. I have no idea why :) MIME parsing
in general is black magic, but in this case it seems pretty clear that
showing it as an attachment is plain wrong. Not showing it at all,
however, is also wrong, but I'm not sure how much complexity it's
worth to handle this case, given it's the first time I've heard of the
problem.


//Magnus



В списке pgsql-www по дате отправления:

Предыдущее
От: "Jonathan S. Katz"
Дата:
Сообщение: Re: archive not showing all attachements
Следующее
От: Andres Freund
Дата:
Сообщение: Re: archive not showing all attachements