subversion/subversion.viewvc-r1418.patch

31 lines
1.2 KiB
Diff
Raw Normal View History

------------------------------------------------------------------------
r1418 | cmpilato | 2006-08-01 18:15:32 +0000 (Tue, 01 Aug 2006) | 10 lines
Backport fix for issue #245 (r1417) to the 1.0.x branch.
* lib/viewvc.py
(build_commit): If the environment variable HTTPS is set to "on", then
construct the rss_url data dictionary item with an "https" method instead
of an "http" one.
---
lib/viewvc.py | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
Index: lib/viewvc.py
===================================================================
--- lib/viewvc.py.orig
+++ lib/viewvc.py
@@ -3205,8 +3205,9 @@ def build_commit(request, files, limited
commit.rss_date = make_rss_time_string(files[0].GetTime(), request.cfg)
if request.roottype == 'svn':
commit.rev = files[0].GetRevision()
- commit.rss_url = 'http://%s%s' % \
- (request.server.getenv("HTTP_HOST"),
+ commit.rss_url = '%s://%s%s' % \
+ (request.server.getenv("HTTPS") == "on" and "https" or "http",
+ request.server.getenv("HTTP_HOST"),
request.get_url(view_func=view_revision,
params={'revision': commit.rev},
escape=1))