Skip to content

Commit

Permalink
gitweb: allow configurations that change with each request
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Jonathan Nieder authored and Junio C Hamano committed Aug 2, 2010
1 parent 64fdc08 commit 7f425db
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions gitweb/gitweb.perl
Original file line number Diff line number Diff line change
Expand Up @@ -1037,8 +1037,12 @@ sub run_request {
reset_timer();

evaluate_uri();
evaluate_gitweb_config();
check_loadavg();

# $projectroot and $projects_list might be set in gitweb config file
$projects_list ||= $projectroot;

evaluate_query_params();
evaluate_path_info();
evaluate_and_validate_params();
Expand Down Expand Up @@ -1086,12 +1090,8 @@ sub evaluate_argv {

sub run {
evaluate_argv();
evaluate_gitweb_config();
evaluate_git_version();

# $projectroot and $projects_list might be set in gitweb config file
$projects_list ||= $projectroot;

$pre_listen_hook->()
if $pre_listen_hook;

Expand Down

0 comments on commit 7f425db

Please sign in to comment.