Skip to content

Commit 7f425db

Browse files
jrngitster
authored andcommitted
gitweb: allow configurations that change with each request
gitolite's contrib/gitweb/gitweb.conf includes: $ENV{GL_USER} = $cgi->remote_user || "gitweb"; which is useful for setups where a user has to be authenticated to access certain repos. Perhaps other typical configurations change per session in other ways, too. v1.7.2-rc2~6 (gitweb: Move evaluate_gitweb_config out of run_request, 2010-07-05) broke such configurations for a speedup, by loading the configuration once per FastCGI process. Probably in the end there should be a way to specify in the configuration whether a particular installation wants the speedup or the flexibility. But for now it is easier to just undo the relevant change. This partially reverts commit 869d588. Reported-by: Julio Lajara <julio.lajara@alum.rpi.edu> Analysis-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Jonathan Nieder <jrnieder@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
1 parent 64fdc08 commit 7f425db

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

gitweb/gitweb.perl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1037,8 +1037,12 @@ sub run_request {
10371037
reset_timer();
10381038

10391039
evaluate_uri();
1040+
evaluate_gitweb_config();
10401041
check_loadavg();
10411042

1043+
# $projectroot and $projects_list might be set in gitweb config file
1044+
$projects_list ||= $projectroot;
1045+
10421046
evaluate_query_params();
10431047
evaluate_path_info();
10441048
evaluate_and_validate_params();
@@ -1086,12 +1090,8 @@ sub evaluate_argv {
10861090

10871091
sub run {
10881092
evaluate_argv();
1089-
evaluate_gitweb_config();
10901093
evaluate_git_version();
10911094

1092-
# $projectroot and $projects_list might be set in gitweb config file
1093-
$projects_list ||= $projectroot;
1094-
10951095
$pre_listen_hook->()
10961096
if $pre_listen_hook;
10971097

0 commit comments

Comments
 (0)