Reattempt download when fetch gets a 301 - during Registration - Mailing list pgsql-www

From Robins Tharakan
Subject Reattempt download when fetch gets a 301 - during Registration
Date
Msg-id CAEP4nAxwsrXhj9rZrzYEaDyavG8_bctMfdd3325poO17fh_cMg@mail.gmail.com
Whole thread Raw
List pgsql-www
Hi,

Attached is a small patch that re-attempts a download when the first fetch attempt during new Feed Registration gets a 301. 

The use-case was when I was trying to register my blog for Planet, I got a abc.blogspot.com feed URL whereas, in reality it was redirecting to abc.com URL instead (because I had configured BlogSpot to do so). 

So although abc.blogspot.com was working on a browser (since it redirects on a 301) the Feed registration page failed with a 'Internal Server Error: Attempt to download blog feed returned status 301'.

I think this is a recoverable error, and so the patch.

NB: Am (very) new to Python, so apologies for some obvious misses.

--
Robins Tharakan
Attachment

pgsql-www by date:

Previous
From: Stephen Frost
Date:
Subject: Re: www.postgresql.org is having problems
Next
From: Jim Nasby
Date:
Subject: git.postgresql.org not finding a commit