git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
Jonathan Nieder <jrnieder@gmail.com>
Date
Aug 2, 2010, 21:01 UTC
Message-ID
<20100802210121.GA3072@burratino>
In-Reply-To
<201008022135.58287.jnareb@gmail.com>
Jakub Narebski wrote:
Show 10 quoted lines
> 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?

Previous: Jakub NarebskiNext: Jakub Narebski
Message 11 of 15 in “Potential bug in gitweb 1.7.2”
  1. Julio LajaraJul 26, 2010
  2. Jonathan NiederJul 26, 2010
  3. Anders KaseorgJul 26, 2010
  4. Julio LajaraJul 26, 2010
  5. Jakub NarebskiJul 26, 2010
  6. Ævar Arnfjörð BjarmasonJul 26, 2010
  7. Julio LajaraJul 26, 2010
  8. Jakub NarebskiJul 26, 2010
  9. gitweb: allow configurations that change with each requestJonathan Nieder, Jul 31, 2010
  10. Jakub NarebskiAug 2, 2010
  11. Jonathan NiederAug 2, 2010
  12. Jakub NarebskiAug 2, 2010
  13. Jonathan NiederJul 26, 2010
  14. Anders KaseorgJul 26, 2010
  15. Jonathan NiederJul 27, 2010

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.