on i4PACE(i for Personal Archiving and Creating Environment)
actions » SearchLogin 89 articles • 30 Jul 2010

Article with comments

Saturday, 03 May 2008

permalink RSS feed

By default in the Frog Blogging program, the URLs of the link to RSS feeds include a port number. Because this server goes thru a reverse-proxy server, the following correction is made to remove the port number from the URLs. Edit feedinfo.y at /var/local/Snakelets-1.44/webapps/frog/docroot, to replace a line with feedURL as follows:

feedBase=self.Request.getBaseURL()
if feedBase.count(':') > 1:
        a = feedBase.rfind(':')
        feedBase = feedBase[:a])
feedURL=feedBase+url("feeds/%s/feed.rss" % self.escape(user.userid))

Did the same to snakelets.py at /var/local/Snakelets-1.44/webapps/frog/frog, i.e., in def rss, edited as

feedBase = request.getBaseURL()
        if feedBase.count(':') > 1:
                a=feedBase.rfind(':')
                feedBase=feedBase[:a]

        rss=RSSFeed(blogtitle,
                    feedBase+frog.util.userURLprefix_snakelet(self, user.userid),
                    blogdescription, "Copyright by "+user.name, timetolive)

Pretty ad hoc, but let it work this way for a while... Hmmm, found it still doesn't work properly :((

Now, really ad-hoc :-S Did:

def getServerName(self):
        if not self.virtualhostport or self.virtualhostport == 80:
            return self.virtualhost
        else:
        #    return '%s:%d' % (self.virtualhost, self.virtualhostport)
            return '%s' % self.virtualhost

on server.py at /var/local/Snakelets-1.44/snakeserver. OK, it's just an ugly hack, but it worked ^_^ Got RSS working properly :-)

• Wrote Teru at 15:03 (edited 7×, last on 03 May 2008) | read 20× | Add comment

Comments (0)

No comments for this article yet.

Write a comment

Your name  
E-mail   (only visible for blog owner)
Homepage
How much is 5+9?   (protection against spam-bots)
Text:

[b] [i] [u] [tt] [center] [code] [quote] [url] [url=] [img] [@] [@@] [@:]
detailed help about markup
Process times: page=0.014 request=0.030 cpu=0.030