{"thread":{"id":"17365","subject":"[PATCH] gitweb: ensure the default stylesheet is accessible","startedAt":"2009-01-26T01:28:42Z","lastAt":"2009-01-26T11:35:36Z","messageCount":3,"participants":["Giuseppe Bilotta","Jakub Narebski"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"101928","messageId":"1232933322-9186-1-git-send-email-giuseppe.bilotta@gmail.com","threadId":"17365","inReplyTo":null,"subject":"[PATCH] gitweb: ensure the default stylesheet is accessible","fromName":"Giuseppe Bilotta","fromEmail":"giuseppe.bilotta@gmail.com","sentAt":"2009-01-26T01:28:42Z","receivedAt":"2009-01-26T01:28:42Z","isPatch":true,"sender":{"key":"giuseppe.bilotta@gmail.com","avatar":"https://avatars.githubusercontent.com/u/1464?v=4"},"body":"On some installations the CSS fails to be linked correctly when\npath_info is enabled, since the link refers to \"gitweb.css\", whereas it\nshould be \"${my_uri}/gitweb.css\". Fix by setting the appropriate default\nin the Makefile.\n\nSigned-off-by: Giuseppe Bilotta <giuseppe.bilotta@gmail.com>\n---\n Makefile |    2 +-\n 1 files changed, 1 insertions(+), 1 deletions(-)\n\ndiff --git a/Makefile b/Makefile\nindex 4ef8234..4f60de9 100644\n--- a/Makefile\n+++ b/Makefile\n@@ -215,7 +215,7 @@ GITWEB_STRICT_EXPORT =\n GITWEB_BASE_URL =\n GITWEB_LIST =\n GITWEB_HOMETEXT = indextext.html\n-GITWEB_CSS = gitweb.css\n+GITWEB_CSS = $${my_uri}/gitweb.css\n GITWEB_LOGO = git-logo.png\n GITWEB_FAVICON = git-favicon.png\n GITWEB_SITE_HEADER =\n-- \n1.5.6.5\n"},{"id":"101929","messageId":"200901260248.22120.jnareb@gmail.com","threadId":"17365","inReplyTo":"1232933322-9186-1-git-send-email-giuseppe.bilotta@gmail.com","subject":"Re: [PATCH] gitweb: ensure the default stylesheet is accessible","fromName":"Jakub Narebski","fromEmail":"jnareb@gmail.com","sentAt":"2009-01-26T01:48:20Z","receivedAt":"2009-01-26T01:48:20Z","isPatch":true,"sender":{"key":"jnareb@gmail.com","avatar":"https://avatars.githubusercontent.com/u/2706?v=4"},"body":"On Mon, 26 Jan 2009, Giuseppe Bilotta wrote:\n\n> On some installations the CSS fails to be linked correctly when\n> path_info is enabled, since the link refers to \"gitweb.css\", whereas it\n> should be \"${my_uri}/gitweb.css\". Fix by setting the appropriate default\n> in the Makefile.\n\nWhy \"on some installations\"? What does \"some\" mean? I don't think it\nis something indeterministic: please spell when one can have problems\nwith linking CSS file.\n\n\nWouldn't it be simpler to deal with problem of base URL when using\npath_info gitweb URLs to add BASE element to HTML head if we use\npath_info? Something like:\n\n\tif ($ENV{'PATH_INFO'}) {  # $path_info is unfortunately stripped\n\t\tprint qq(<base href=\"$my_uri\">\\n);\n\t} \n\nsomewhere in git_header_html() subroutine?\n\nSee also comment below.\n\n> \n> Signed-off-by: Giuseppe Bilotta <giuseppe.bilotta@gmail.com>\n> ---\n>  Makefile |    2 +-\n>  1 files changed, 1 insertions(+), 1 deletions(-)\n> \n> diff --git a/Makefile b/Makefile\n> index 4ef8234..4f60de9 100644\n> --- a/Makefile\n> +++ b/Makefile\n> @@ -215,7 +215,7 @@ GITWEB_STRICT_EXPORT =\n>  GITWEB_BASE_URL =\n>  GITWEB_LIST =\n>  GITWEB_HOMETEXT = indextext.html\n> -GITWEB_CSS = gitweb.css\n> +GITWEB_CSS = $${my_uri}/gitweb.css\n>  GITWEB_LOGO = git-logo.png\n>  GITWEB_FAVICON = git-favicon.png\n\nIt is not the same case for git-logo.png and git-favicon.png as for\ngitweb.css? If it is not, please explain why in commit message.\nIf it is, then your patch is only partial solution to path_info\nproblem.\n\n>  GITWEB_SITE_HEADER =\n> -- \n> 1.5.6.5\n> \n> \n\n-- \nJakub Narebski\nPoland\n"},{"id":"101967","messageId":"cb7bb73a0901260335n3cc53295m162ca56810702596@mail.gmail.com","threadId":"17365","inReplyTo":"200901260248.22120.jnareb@gmail.com","subject":"Re: [PATCH] gitweb: ensure the default stylesheet is accessible","fromName":"Giuseppe Bilotta","fromEmail":"giuseppe.bilotta@gmail.com","sentAt":"2009-01-26T11:35:36Z","receivedAt":"2009-01-26T11:35:36Z","isPatch":true,"sender":{"key":"giuseppe.bilotta@gmail.com","avatar":"https://avatars.githubusercontent.com/u/1464?v=4"},"body":"On Mon, Jan 26, 2009 at 2:48 AM, Jakub Narebski <jnareb@gmail.com> wrote:\n> On Mon, 26 Jan 2009, Giuseppe Bilotta wrote:\n>\n>> On some installations the CSS fails to be linked correctly when\n>> path_info is enabled, since the link refers to \"gitweb.css\", whereas it\n>> should be \"${my_uri}/gitweb.css\". Fix by setting the appropriate default\n>> in the Makefile.\n>\n> Why \"on some installations\"? What does \"some\" mean? I don't think it\n> is something indeterministic: please spell when one can have problems\n> with linking CSS file.\n\nThe truth is, I haven't the slightest idea. It works fine on my\nmachine, it doesn't without the patch on ruby-rbot.org, but I really\ndon't know why.\n\n> Wouldn't it be simpler to deal with problem of base URL when using\n> path_info gitweb URLs to add BASE element to HTML head if we use\n> path_info? Something like:\n>\n>        if ($ENV{'PATH_INFO'}) {  # $path_info is unfortunately stripped\n>                print qq(<base href=\"$my_uri\">\\n);\n>        }\n>\n> somewhere in git_header_html() subroutine?\n\nAh, this might work. I'll test it.\n\n> It is not the same case for git-logo.png and git-favicon.png as for\n> gitweb.css? If it is not, please explain why in commit message.\n> If it is, then your patch is only partial solution to path_info\n> problem.\n\nOh, interesting, true, I hadn't noticed.\n\nI'll look into the base thing.\n\n-- \nGiuseppe \"Oblomov\" Bilotta\n"}]}