Mercurial > p > roundup > code
diff roundup/rest.py @ 5616:aa4c271514ae
Original code generated url's using a harcoded protocol and took the
hostname from the hostname used to access the tracker. This patch uses
the canonical path from config.ini for generating all links.
| author | John Rouillard <rouilj@ieee.org> |
|---|---|
| date | Sat, 16 Feb 2019 15:24:53 -0500 |
| parents | ed02a1e0aa5d |
| children | 38b7c4693d9a |
line wrap: on
line diff
--- a/roundup/rest.py Sat Feb 16 15:21:47 2019 -0500 +++ b/roundup/rest.py Sat Feb 16 15:24:53 2019 -0500 @@ -249,10 +249,8 @@ # restore actions. self.actions = dict (retire = actions.Retire, restore = actions.Restore) - protocol = 'http' - host = self.client.env['HTTP_HOST'] - tracker = self.client.env['TRACKER_NAME'] - self.base_path = '%s://%s/%s/rest' % (protocol, host, tracker) + # note TRACKER_WEB ends in a / + self.base_path = '%srest' % (self.db.config.TRACKER_WEB) self.data_path = self.base_path + '/data' def props_from_args(self, cl, args, itemid=None):
