Hi folks,
rationale for this patch: * Debian wheezy * VirtualHost container for git repositories (running under a different user than www-data using apache2-mpm-itk on port 446) * include said vhost via reverse proxy in the main https site Calling the main site, the Atom feed URL gets created as -------8<--------- <link rel='alternate' title='Atom feed' href='http://localhost:446/repositories/cgit/[...]' type='application/atom+xml'/> -------8<--------- which is obviously useless. As far as I can tell every other URL is created as relative href, so the attached patch changes the feed URL to a relative one as well, namely -------8<--------- <link rel='alternate' title='Atom feed' href='/repositories/cgit/[...]' type='application/atom+xml'/> -------8<--------- Thanks! Cheers, Daniel
>From 1d064d00d958228ef4782f02f5ae42a58bf44a2b Mon Sep 17 00:00:00 2001 From: Daniel Reichelt <deb...@nachtgeist.net> Date: Sat, 30 Nov 2013 06:32:36 +0100 Subject: [PATCH] use relative URL for <link rel='alternate' title='Atom feed'...> --- ui-shared.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/ui-shared.c b/ui-shared.c index 7ab2ab1..5c1dec8 100644 --- a/ui-shared.c +++ b/ui-shared.c @@ -681,8 +681,6 @@ void cgit_print_docstart(struct cgit_context *ctx) strbuf_addf(&sb, "h=%s", ctx->qry.head); html("<link rel='alternate' title='Atom feed' href='"); - html(cgit_httpscheme()); - html_attr(cgit_hosturl()); html_attr(cgit_fileurl(ctx->repo->url, "atom", ctx->qry.vpath, sb.buf)); html("' type='application/atom+xml'/>\n"); -- 1.7.10.4
_______________________________________________ CGit mailing list CGit@lists.zx2c4.com http://lists.zx2c4.com/mailman/listinfo/cgit