feed: remove trailing / from base URL

This way, one can use "/" as base URL. This is only valid if we are
sure that URI should always have a leading "/". Is that the case?

Fix #437.
This commit is contained in:
Vincent Bernat 2018-05-07 21:16:48 +02:00
parent 97721c7eef
commit 8e4f2ab1c7

View File

@ -887,7 +887,7 @@ class API(object):
except ValueError: except ValueError:
return BadRequest("limit should be integer") return BadRequest("limit should be integer")
comments = self.comments.fetch(**args) comments = self.comments.fetch(**args)
base = conf.get('base') base = conf.get('base').rstrip('/')
hostname = urlparse(base).netloc hostname = urlparse(base).netloc
# Let's build an Atom feed. # Let's build an Atom feed.