summaryrefslogtreecommitdiffabout
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--ui-atom.c6
-rw-r--r--ui-shared.c14
-rw-r--r--ui-shared.h1
3 files changed, 18 insertions, 3 deletions
diff --git a/ui-atom.c b/ui-atom.c
index a6ea3ee..e5c31d9 100644
--- a/ui-atom.c
+++ b/ui-atom.c
@@ -54,3 +54,4 @@ void add_entry(struct commit *commit, char *host)
54 if (host) { 54 if (host) {
55 html("<link rel='alternate' type='text/html' href='http://"); 55 html("<link rel='alternate' type='text/html' href='");
56 html(cgit_httpscheme());
56 html_attr(host); 57 html_attr(host);
@@ -115,3 +116,4 @@ void cgit_print_atom(char *tip, char *path, int max_count)
115 if (host) { 116 if (host) {
116 html("<link rel='alternate' type='text/html' href='http://"); 117 html("<link rel='alternate' type='text/html' href='");
118 html(cgit_httpscheme());
117 html_attr(host); 119 html_attr(host);
diff --git a/ui-shared.c b/ui-shared.c
index 2630f23..29036d0 100644
--- a/ui-shared.c
+++ b/ui-shared.c
@@ -36,2 +36,13 @@ void cgit_print_error(char *msg)
36 36
37char *cgit_httpscheme()
38{
39 char *https;
40
41 https = getenv("HTTPS");
42 if (https != NULL && strcmp(https, "on") == 0)
43 return "https://";
44 else
45 return "http://";
46}
47
37char *cgit_hosturl() 48char *cgit_hosturl()
@@ -496,3 +507,4 @@ void cgit_print_docstart(struct cgit_context *ctx)
496 if (host && ctx->repo) { 507 if (host && ctx->repo) {
497 html("<link rel='alternate' title='Atom feed' href='http://"); 508 html("<link rel='alternate' title='Atom feed' href='");
509 html(cgit_httpscheme());
498 html_attr(cgit_hosturl()); 510 html_attr(cgit_hosturl());
diff --git a/ui-shared.h b/ui-shared.h
index 5a3821f..bff4826 100644
--- a/ui-shared.h
+++ b/ui-shared.h
@@ -3,2 +3,3 @@
3 3
4extern char *cgit_httpscheme();
4extern char *cgit_hosturl(); 5extern char *cgit_hosturl();