summaryrefslogtreecommitdiffabout
path: root/ui-atom.c
Side-by-side diff
Diffstat (limited to 'ui-atom.c') (more/less context) (show whitespace changes)
-rw-r--r--ui-atom.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/ui-atom.c b/ui-atom.c
index a6ea3ee..e5c31d9 100644
--- a/ui-atom.c
+++ b/ui-atom.c
@@ -43,25 +43,26 @@ void add_entry(struct commit *commit, char *host)
if (t2)
*t2 = '\0';
html("<email>");
html_txt(t);
html("</email>\n");
free(mail);
}
html("</author>\n");
html("<published>");
cgit_print_date(info->author_date, FMT_ATOMDATE, ctx.cfg.local_time);
html("</published>\n");
if (host) {
- html("<link rel='alternate' type='text/html' href='http://");
+ html("<link rel='alternate' type='text/html' href='");
+ html(cgit_httpscheme());
html_attr(host);
html_attr(cgit_pageurl(ctx.repo->url, "commit", NULL));
if (ctx.cfg.virtual_root)
delim = '?';
htmlf("%cid=%s", delim, hex);
html("'/>\n");
}
htmlf("<id>%s</id>\n", hex);
html("<content type='text'>\n");
html_txt(info->msg);
html("</content>\n");
html("<content type='xhtml'>\n");
@@ -104,25 +105,26 @@ void cgit_print_atom(char *tip, char *path, int max_count)
host = cgit_hosturl();
ctx.page.mimetype = "text/xml";
ctx.page.charset = "utf-8";
cgit_print_http_headers(&ctx);
html("<feed xmlns='http://www.w3.org/2005/Atom'>\n");
html("<title>");
html_txt(ctx.repo->name);
html("</title>\n");
html("<subtitle>");
html_txt(ctx.repo->desc);
html("</subtitle>\n");
if (host) {
- html("<link rel='alternate' type='text/html' href='http://");
+ html("<link rel='alternate' type='text/html' href='");
+ html(cgit_httpscheme());
html_attr(host);
html_attr(cgit_repourl(ctx.repo->url));
html("'/>\n");
}
while ((commit = get_revision(&rev)) != NULL) {
add_entry(commit, host);
free(commit->buffer);
commit->buffer = NULL;
free_commit_list(commit->parents);
commit->parents = NULL;
}
html("</feed>\n");