Re: Shorter archive URLs

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Bruce Momjian <bruce(at)momjian(dot)us>
Cc: Magnus Hagander <magnus(at)hagander(dot)net>, PostgreSQL WWW <pgsql-www(at)lists(dot)postgresql(dot)org>
Subject: Re: Shorter archive URLs
Date: 2019-07-16 03:49:05
Message-ID: 13730.1563248945@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-www

Bruce Momjian <bruce(at)momjian(dot)us> writes:
> On Sun, Jul 14, 2019 at 12:52:46PM +0200, Magnus Hagander wrote:
>> This means that instead of being:
>> https://www.postgresql.org/message-id/
>> CABUevEyqGVV-s1yXQBsTpoPDCHy79j-yDtJcucrPb9Hh4CFTNg%40mail.gmail.com
>>
>> The url would be:
>> https://www.postgresql.org/message-id/Z0oaTfo56bV4tke6-r_PKJstHF8=

> It would be nice if I could easily compute the hash if I know the
> message-id --- I assume I can just run it through sha1. This would
> allow me to shorten commit URLs, which would be a win for GMail.

Now that I look closer, Magnus' example shows that this proposal
is underspecified: exactly how would the message-ID be rendered
before being fed into sha1? In particular it's not clear from
this whether "@" should be spelled "@" or "%40". The existing
archive website is quite forgiving about that, you can write
either --- but the sha1 transform would be utterly unforgiving.
Instead of opaque hash X you'd get opaque hash Y, and there'd
be no way even to see what caused the mismatch.

(BTW, after some experimentation I'm totally unable to reproduce
Magnus' example using sha1sum(1) and base64(1), so that is not
the only underspecified point here.)

regards, tom lane

In response to

Responses

Browse pgsql-www by date

  From Date Subject
Next Message Magnus Hagander 2019-07-16 08:49:41 Re: Shorter archive URLs
Previous Message Bruce Momjian 2019-07-16 03:21:41 Re: Shorter archive URLs