summaryrefslogtreecommitdiffabout
path: root/ui-atom.c
authorLars Hjemli <hjemli@gmail.com>2009-07-25 09:40:25 (UTC)
committer Lars Hjemli <hjemli@gmail.com>2009-07-25 09:41:06 (UTC)
commitfbe091a716447be496519ce439451d36d5b9fc24 (patch) (side-by-side diff)
treec6560c6f2ab6b4760ac6eaecda1759321da2746e /ui-atom.c
parente429fb0cca1e8c78da0ec38fe578bafdeec65534 (diff)
parent694dd43886f23723f415aed3afb62131cdbcaa51 (diff)
downloadcgit-fbe091a716447be496519ce439451d36d5b9fc24.zip
cgit-fbe091a716447be496519ce439451d36d5b9fc24.tar.gz
cgit-fbe091a716447be496519ce439451d36d5b9fc24.tar.bz2
Merge branch 'do/https'
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
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");