add cgit_httpscheme() -> http:// or https://

此提交包含在:
Diego Ongaro
2009-06-10 18:09:55 -05:00
父節點 45e7fcecc1
當前提交 87a89aed41
共有 2 個檔案被更改,包括 12 行新增0 行删除

查看文件

@ -34,6 +34,17 @@ void cgit_print_error(char *msg)
html("</div>\n");
}
char *cgit_httpscheme()
{
char *https;
https = getenv("HTTPS");
if (https != NULL && strcmp(https, "on") == 0)
return "https://";
else
return "http://";
}
char *cgit_hosturl()
{
char *host, *port;