Thread (15 messages) flat view 15 messages, 5 authors, 2016-06-15

Re: [PATCH/RFC] gitweb: allow configurations that change with each request

From: Jonathan Nieder <hidden>
Date: 2016-06-15 22:49:14

Jakub Narebski wrote:
One solution I can think of (still backwards incompatibile) would be to
provide $per_request_config variable, which would hold anonymous sub
with parts of config that need to be done per request (this should work
with global variables (our), but I think it wouldn't work with lexical
variables (my)).  For example gitolite's contrib/gitweb/gitweb.conf would
then include:

  $per_request_config = sub {
  	$ENV{GL_USER} = $cgi->remote_user || "gitweb";
  }
How would that interact with caching?  i.e., how would whatever caching
engine is used learn that $cgi->remote_user is part of the key needed to
uniquely determine a response?
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help