Re: Shorter archive URLs - Mailing list pgsql-www

From Tom Lane
Subject Re: Shorter archive URLs
Date
Msg-id 13730.1563248945@sss.pgh.pa.us
Whole thread Raw
In response to Re: Shorter archive URLs  (Bruce Momjian <bruce@momjian.us>)
Responses Re: Shorter archive URLs  (Magnus Hagander <magnus@hagander.net>)
List pgsql-www
Bruce Momjian <bruce@momjian.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



pgsql-www by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: Shorter archive URLs
Next
From: Magnus Hagander
Date:
Subject: Re: Shorter archive URLs