rss: fix --rp-loc;

some rss links were malformed when combined with rp-loc
This commit is contained in:
ed 2025-07-14 03:48:27 +02:00
parent 78605d9a79
commit 56d3bcf515

View file

@ -1374,12 +1374,13 @@ class HttpCli(object):
title = self.uparam.get("title") or self.vpath.split("/")[-1] title = self.uparam.get("title") or self.vpath.split("/")[-1]
etitle = html_escape(title, True, True) etitle = html_escape(title, True, True)
baseurl = "%s://%s%s" % ( baseurl = "%s://%s/" % (
"https" if self.is_https else "http", "https" if self.is_https else "http",
self.host, self.host,
self.args.SRS,
) )
feed = "%s%s" % (baseurl, self.req[1:]) feed = baseurl + self.req[1:]
if self.is_vproxied:
baseurl += self.args.RS
efeed = html_escape(feed, True, True) efeed = html_escape(feed, True, True)
edirlink = efeed.split("?")[0] + q_pw edirlink = efeed.split("?")[0] + q_pw
@ -1392,7 +1393,7 @@ class HttpCli(object):
\t\t<title>%s</title> \t\t<title>%s</title>
\t\t<description></description> \t\t<description></description>
\t\t<link>%s</link> \t\t<link>%s</link>
\t\t<generator>copyparty-1</generator> \t\t<generator>copyparty-2</generator>
""" """
% (efeed, etitle, edirlink) % (efeed, etitle, edirlink)
] ]