Adjust URI scheme according to CGI environment variable HTTPS.
Fri Jun 22 09:30:21 UTC 2007 Peter Colberg <peterco@gmx.net>
* Adjust URI scheme according to CGI environment variable HTTPS.
This patch fixes RSS feed links when browsing darcsweb via SSL.
{
hunk ./darcsweb.cgi 2325
- if p == '80':
+ u = os.environ.get('HTTPS', 'off') in ('on', '1')
+ if not u and p == '80' or u and p == '443':
hunk ./darcsweb.cgi 2330
- config.myurl = 'http://%s%s%s' % (n, p, s)
+ config.myurl = 'http%s://%s%s%s' % (u and 's' or '', n, p, s)
}