diff options
Diffstat (limited to 'gitweb')
-rwxr-xr-x | gitweb/gitweb.perl | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl index 9446376535..cedc357313 100755 --- a/gitweb/gitweb.perl +++ b/gitweb/gitweb.perl @@ -1027,18 +1027,18 @@ sub dispatch { $actions{$action}->(); } -sub run_request { +sub reset_timer { our $t0 = [Time::HiRes::gettimeofday()] if defined $t0; + our $number_of_git_cmds = 0; +} + +sub run_request { + reset_timer(); evaluate_uri(); - evaluate_gitweb_config(); - evaluate_git_version(); 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(); @@ -1086,6 +1086,11 @@ 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; @@ -1322,8 +1327,7 @@ sub esc_param { sub esc_url { my $str = shift; return undef unless defined $str; - $str =~ s/([^A-Za-z0-9\-_.~();\/;?:@&=])/sprintf("%%%02X", ord($1))/eg; - $str =~ s/\+/%2B/g; + $str =~ s/([^A-Za-z0-9\-_.~();\/;?:@&= ]+)/CGI::escape($1)/eg; $str =~ s/ /\+/g; return $str; } |