Thread: Re: [HACKERS] pull raw text of a message by message-id

Re: [HACKERS] pull raw text of a message by message-id

From
Alvaro Herrera
Date:
Robert Haas escribió:

> Oh, this is awesome.  It would be handy to include a link on the HTML
> version of the page for when people are trying to pull down a patch
> that someone has foolishly included in the body of the email rather
> than attaching it.

There already is one :-)  Look at the headers -- after the Message-Id there is
a link which says "text/plain".

-- 
Alvaro Herrera                                http://www.CommandPrompt.com/
PostgreSQL Replication, Consulting, Custom Development, 24x7 support


Re: [HACKERS] pull raw text of a message by message-id

From
Tom Lane
Date:
Alvaro Herrera <alvherre@commandprompt.com> writes:
> There already is one :-)  Look at the headers -- after the Message-Id there is
> a link which says "text/plain".

On the couple of messages I tried this on, that link leads to a page
saying "not found" :-(
        regards, tom lane


Re: [HACKERS] pull raw text of a message by message-id

From
Alvaro Herrera
Date:
Tom Lane escribió:
> Alvaro Herrera <alvherre@commandprompt.com> writes:
> > There already is one :-)  Look at the headers -- after the Message-Id there is
> > a link which says "text/plain".
> 
> On the couple of messages I tried this on, that link leads to a page
> saying "not found" :-(

Probably you tried messages that hadn't been indexed.  I had only
generated pgsql-hackers, and even then not the most recent ones; but I
just added the generation step to the script that runs every 10 minutes,
so all recent messages should be indexed on all lists.

-- 
Alvaro Herrera                                http://www.CommandPrompt.com/
PostgreSQL Replication, Consulting, Custom Development, 24x7 support


Re: [HACKERS] pull raw text of a message by message-id

From
Tom Lane
Date:
Andrew Dunstan <andrew@dunslane.net> writes:
> Tom Lane wrote:
>> On the couple of messages I tried this on, that link leads to a page
>> saying "not found" :-(

> Really? I just tried 4 pages picked at random off the -hackers list  
> <http://archives.postgresql.org/pgsql-hackers/2009-05/index.php> and all 
> the "text/plain" links worked as expected.

I retried the messages I looked at before, and they work now, so I guess
the update script hadn't finished?
        regards, tom lane


Re: [HACKERS] pull raw text of a message by message-id

From
Andrew Dunstan
Date:

Tom Lane wrote:
> Alvaro Herrera <alvherre@commandprompt.com> writes:
>   
>> There already is one :-)  Look at the headers -- after the Message-Id there is
>> a link which says "text/plain".
>>     
>
> On the couple of messages I tried this on, that link leads to a page
> saying "not found" :-(
>
>             
>   

Really? I just tried 4 pages picked at random off the -hackers list  
<http://archives.postgresql.org/pgsql-hackers/2009-05/index.php> and all 
the "text/plain" links worked as expected. I even went back to something 
in 2000 and it still worked.

cheers

andrew


Re: [HACKERS] pull raw text of a message by message-id

From
Bruce Momjian
Date:
Alvaro Herrera wrote:
> Robert Haas escribi?:
> 
> > Oh, this is awesome.  It would be handy to include a link on the HTML
> > version of the page for when people are trying to pull down a patch
> > that someone has foolishly included in the body of the email rather
> > than attaching it.
> 
> There already is one :-)  Look at the headers -- after the Message-Id there is
> a link which says "text/plain".

I don't see a text/plain option on this page:
http://archives.postgresql.org/pgsql-hackers/2009-05/msg00466.php

Why?

--  Bruce Momjian  <bruce@momjian.us>        http://momjian.us EnterpriseDB
http://enterprisedb.com
 + If your life is a hard drive, Christ can be your backup. +


Re: [HACKERS] pull raw text of a message by message-id

From
Alvaro Herrera
Date:
Bruce Momjian escribió:
> Alvaro Herrera wrote:
> > Robert Haas escribi?:
> > 
> > > Oh, this is awesome.  It would be handy to include a link on the HTML
> > > version of the page for when people are trying to pull down a patch
> > > that someone has foolishly included in the body of the email rather
> > > than attaching it.
> > 
> > There already is one :-)  Look at the headers -- after the Message-Id there is
> > a link which says "text/plain".
> 
> I don't see a text/plain option on this page:
> 
>     http://archives.postgresql.org/pgsql-hackers/2009-05/msg00466.php
> 
> Why?

Argh.  I think this whole thing died when I fixed the bug about
message-id links in the message body being mangled reported by Tom, some
days ago.  The Message-id links are now being generated internally by
Mhonarc instead of your script ...

I don't think it's difficult to fix this problem but I don't have time
to do it right now :-(

(Maybe it's time I bit the bullet and stopped kludging the Mhonarc
install all over the place and instead spent some time on the new
archives code ...)

-- 
Alvaro Herrera                                http://www.CommandPrompt.com/
The PostgreSQL Company - Command Prompt, Inc.


Re: [HACKERS] pull raw text of a message by message-id

From
Robert Haas
Date:
On Thu, Jun 4, 2009 at 5:53 PM, Alvaro
Herrera<alvherre@commandprompt.com> wrote:
> Bruce Momjian escribió:
>> Alvaro Herrera wrote:
>> > Robert Haas escribi?:
>> >
>> > > Oh, this is awesome.  It would be handy to include a link on the HTML
>> > > version of the page for when people are trying to pull down a patch
>> > > that someone has foolishly included in the body of the email rather
>> > > than attaching it.
>> >
>> > There already is one :-)  Look at the headers -- after the Message-Id there is
>> > a link which says "text/plain".
>>
>> I don't see a text/plain option on this page:
>>
>>       http://archives.postgresql.org/pgsql-hackers/2009-05/msg00466.php
>>
>> Why?
>
> Argh.  I think this whole thing died when I fixed the bug about
> message-id links in the message body being mangled reported by Tom, some
> days ago.  The Message-id links are now being generated internally by
> Mhonarc instead of your script ...
>
> I don't think it's difficult to fix this problem but I don't have time
> to do it right now :-(
>
> (Maybe it's time I bit the bullet and stopped kludging the Mhonarc
> install all over the place and instead spent some time on the new
> archives code ...)

I see that this has been fixed, but should I count on it staying
fixed?  My original motivation for asking for it was to integrate it
into the CommitFest management tool I've been hacking on
(http://coridan.postgresql.org/), but I probably don't want to do that
if it's apt to break frequently.

One suggestion: Could you make it return a 404 error if the message ID
is unknown, rather than 200 OK and a body of "not found"?

...Robert