git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] gitweb: ensure the default stylesheet is accessible
@ 2009-01-26  1:28 Giuseppe Bilotta
  2009-01-26  1:48 ` Jakub Narebski
  0 siblings, 1 reply; 3+ messages in thread
From: Giuseppe Bilotta @ 2009-01-26  1:28 UTC (permalink / raw)
  To: git; +Cc: Jakub Narebski, Junio C Hamano, Giuseppe Bilotta

On some installations the CSS fails to be linked correctly when
path_info is enabled, since the link refers to "gitweb.css", whereas it
should be "${my_uri}/gitweb.css". Fix by setting the appropriate default
in the Makefile.

Signed-off-by: Giuseppe Bilotta <giuseppe.bilotta@gmail.com>
---
 Makefile |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/Makefile b/Makefile
index 4ef8234..4f60de9 100644
--- a/Makefile
+++ b/Makefile
@@ -215,7 +215,7 @@ GITWEB_STRICT_EXPORT =
 GITWEB_BASE_URL =
 GITWEB_LIST =
 GITWEB_HOMETEXT = indextext.html
-GITWEB_CSS = gitweb.css
+GITWEB_CSS = $${my_uri}/gitweb.css
 GITWEB_LOGO = git-logo.png
 GITWEB_FAVICON = git-favicon.png
 GITWEB_SITE_HEADER =
-- 
1.5.6.5

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] gitweb: ensure the default stylesheet is accessible
  2009-01-26  1:28 [PATCH] gitweb: ensure the default stylesheet is accessible Giuseppe Bilotta
@ 2009-01-26  1:48 ` Jakub Narebski
  2009-01-26 11:35   ` Giuseppe Bilotta
  0 siblings, 1 reply; 3+ messages in thread
From: Jakub Narebski @ 2009-01-26  1:48 UTC (permalink / raw)
  To: Giuseppe Bilotta; +Cc: git, Junio C Hamano

On Mon, 26 Jan 2009, Giuseppe Bilotta wrote:

> On some installations the CSS fails to be linked correctly when
> path_info is enabled, since the link refers to "gitweb.css", whereas it
> should be "${my_uri}/gitweb.css". Fix by setting the appropriate default
> in the Makefile.

Why "on some installations"? What does "some" mean? I don't think it
is something indeterministic: please spell when one can have problems
with linking CSS file.


Wouldn't it be simpler to deal with problem of base URL when using
path_info gitweb URLs to add BASE element to HTML head if we use
path_info? Something like:

	if ($ENV{'PATH_INFO'}) {  # $path_info is unfortunately stripped
		print qq(<base href="$my_uri">\n);
	} 

somewhere in git_header_html() subroutine?

See also comment below.

> 
> Signed-off-by: Giuseppe Bilotta <giuseppe.bilotta@gmail.com>
> ---
>  Makefile |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/Makefile b/Makefile
> index 4ef8234..4f60de9 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -215,7 +215,7 @@ GITWEB_STRICT_EXPORT =
>  GITWEB_BASE_URL =
>  GITWEB_LIST =
>  GITWEB_HOMETEXT = indextext.html
> -GITWEB_CSS = gitweb.css
> +GITWEB_CSS = $${my_uri}/gitweb.css
>  GITWEB_LOGO = git-logo.png
>  GITWEB_FAVICON = git-favicon.png

It is not the same case for git-logo.png and git-favicon.png as for
gitweb.css? If it is not, please explain why in commit message.
If it is, then your patch is only partial solution to path_info
problem.

>  GITWEB_SITE_HEADER =
> -- 
> 1.5.6.5
> 
> 

-- 
Jakub Narebski
Poland

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] gitweb: ensure the default stylesheet is accessible
  2009-01-26  1:48 ` Jakub Narebski
@ 2009-01-26 11:35   ` Giuseppe Bilotta
  0 siblings, 0 replies; 3+ messages in thread
From: Giuseppe Bilotta @ 2009-01-26 11:35 UTC (permalink / raw)
  To: Jakub Narebski; +Cc: git, Junio C Hamano

On Mon, Jan 26, 2009 at 2:48 AM, Jakub Narebski <jnareb@gmail.com> wrote:
> On Mon, 26 Jan 2009, Giuseppe Bilotta wrote:
>
>> On some installations the CSS fails to be linked correctly when
>> path_info is enabled, since the link refers to "gitweb.css", whereas it
>> should be "${my_uri}/gitweb.css". Fix by setting the appropriate default
>> in the Makefile.
>
> Why "on some installations"? What does "some" mean? I don't think it
> is something indeterministic: please spell when one can have problems
> with linking CSS file.

The truth is, I haven't the slightest idea. It works fine on my
machine, it doesn't without the patch on ruby-rbot.org, but I really
don't know why.

> Wouldn't it be simpler to deal with problem of base URL when using
> path_info gitweb URLs to add BASE element to HTML head if we use
> path_info? Something like:
>
>        if ($ENV{'PATH_INFO'}) {  # $path_info is unfortunately stripped
>                print qq(<base href="$my_uri">\n);
>        }
>
> somewhere in git_header_html() subroutine?

Ah, this might work. I'll test it.

> It is not the same case for git-logo.png and git-favicon.png as for
> gitweb.css? If it is not, please explain why in commit message.
> If it is, then your patch is only partial solution to path_info
> problem.

Oh, interesting, true, I hadn't noticed.

I'll look into the base thing.

-- 
Giuseppe "Oblomov" Bilotta

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2009-01-26 11:42 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-01-26  1:28 [PATCH] gitweb: ensure the default stylesheet is accessible Giuseppe Bilotta
2009-01-26  1:48 ` Jakub Narebski
2009-01-26 11:35   ` Giuseppe Bilotta

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).