Skip to content

Commit 56d3bcf

Browse files
committed
rss: fix --rp-loc;
some rss links were malformed when combined with rp-loc
1 parent 78605d9 commit 56d3bcf

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

copyparty/httpcli.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1374,12 +1374,13 @@ def tx_rss(self) -> bool:
13741374
title = self.uparam.get("title") or self.vpath.split("/")[-1]
13751375
etitle = html_escape(title, True, True)
13761376

1377-
baseurl = "%s://%s%s" % (
1377+
baseurl = "%s://%s/" % (
13781378
"https" if self.is_https else "http",
13791379
self.host,
1380-
self.args.SRS,
13811380
)
1382-
feed = "%s%s" % (baseurl, self.req[1:])
1381+
feed = baseurl + self.req[1:]
1382+
if self.is_vproxied:
1383+
baseurl += self.args.RS
13831384
efeed = html_escape(feed, True, True)
13841385
edirlink = efeed.split("?")[0] + q_pw
13851386

@@ -1392,7 +1393,7 @@ def tx_rss(self) -> bool:
13921393
\t\t<title>%s</title>
13931394
\t\t<description></description>
13941395
\t\t<link>%s</link>
1395-
\t\t<generator>copyparty-1</generator>
1396+
\t\t<generator>copyparty-2</generator>
13961397
"""
13971398
% (efeed, etitle, edirlink)
13981399
]

0 commit comments

Comments
 (0)