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

[PATCH 0/2] gitweb: Add support for running gitweb as FastCGI script

From
Jakub Narebski <jnareb@gmail.com>
Date
May 7, 2010, 12:54 UTC
Message-ID
<1273236845-6523-1-git-send-email-jnareb@gmail.com>
This series requires the following patch:
  [PATCH 3/5] gitweb: Use nonlocal jump instead of 'exit' in die_error
  http://article.gmane.org/gmane.comp.version-control.git/145678

which is present as c42b00c commit in 'pu', as part of 'jn/gitweb-caching-prep' branch, which was merged into 'pu' at 97153ab7.

This patch adds support for FastCGI directly to gitweb.perl (so it would be present in gitweb.cgi); selecting between FastCGI and CGI is done via command-line switch (command-line option). It uses CGI::Fast, which is core Perl module.

It is port of old patch by Sam Vilain from 2006 to new gitweb announced in

  "Re: gitweb testing with non-apache web server"
  http://article.gmane.org/gmane.comp.version-control.git/24718

The preparatory patch is refactoring work, to not need to have request loop around large parts of code. I think the preparatory patch makes gitweb code more clean.

The alternate solution would be to add gitweb.fcgi wrapper, like e.g.: in the following patch by Eric Wong

  "[PATCH 1/2] gitweb: add a simple wrapper for FCGI support"
  http://thread.gmane.org/gmane.comp.version-control.git/35920/focus=35921

which was part of the "[0/2 PATCH] FastCGI and nginx support for gitweb" series. (Note that the patch does 'do $gitweb_cgi;' without checking for errors, see the bottom of `perldoc -f do` documentation on how it should be done).

Some other references:
* "GitWeb in FastCGI" by Peter Vereshagin
  http://thread.gmane.org/gmane.comp.version-control.git/142132
* "FastCGI support in gitweb" by Juan Jose Comellas
  http://thread.gmane.org/gmane.comp.version-control.git/75704
Table of contents:
~~~~~~~~~~~~~~~~~~
 [PATCH/RFC 1/2] gitweb: Put all per-connection code in run() subroutine
 [PATCH/RFC 2/2] gitweb: Add support for FastCGI, using CGI::Fast
Jakub Narebski (1):
  gitweb: Put all per-connection code in run() subroutine
Sam Vilain (1):
  gitweb: Add support for FastCGI, using CGI::Fast

Diffstat: ~~~~~~~~~

 gitweb/gitweb.perl |  409 ++++++++++++++++++++++++++++++++--------------------
 1 files changed, 255 insertions(+), 154 deletions(-)

Diffstat -w: ~~~~~~~~~~~~ When ignoring whitespace change (reindenting)

 gitweb/gitweb.perl |  117 ++++++++++++++++++++++++++++++++++++++++++++++++----
 1 files changed, 109 insertions(+), 8 deletions(-)
-- 
Jakub Narebski
Next: Jakub Narebski
Message 1 of 30 in “gitweb: Add support for running gitweb as FastCGI script”
  1. 0/2 gitweb: Add support for running gitweb as FastCGI scriptJakub Narebski, May 7, 2010
  2. 1/2 gitweb: Put all per-connection code in run() subroutineJakub Narebski, May 7, 2010
  3. 2/2 gitweb: Add support for FastCGI, using CGI::FastJakub Narebski, May 7, 2010
  4. 2/2 gitweb: Add support for FastCGI, using CGI::FastJakub Narebski, May 8, 2010
  5. Jakub NarebskiMay 8, 2010
  6. Eric WongMay 9, 2010
  7. Ævar Arnfjörð BjarmasonMay 9, 2010
  8. Jakub NarebskiMay 9, 2010
  9. Peter VereshaginMay 9, 2010
  10. Jakub NarebskiMay 9, 2010
  11. Peter VereshaginMay 10, 2010
  12. Jakub NarebskiMay 10, 2010
  13. Peter VereshaginMay 11, 2010
  14. Petr BaudisMay 11, 2010
  15. Jakub NarebskiMay 11, 2010
  16. Peter VereshaginMay 11, 2010
  17. Jakub NarebskiMay 11, 2010
  18. Peter VereshaginMay 13, 2010
  19. Ævar Arnfjörð BjarmasonMay 13, 2010
  20. Peter VereshaginMay 14, 2010
  21. Jakub NarebskiMay 14, 2010
  22. Peter VereshaginMay 14, 2010
  23. Jakub NarebskiMay 14, 2010
  24. Jakub NarebskiMay 14, 2010
  25. Peter VereshaginMay 15, 2010
  26. Jakub NarebskiMay 15, 2010
  27. Peter VereshaginMay 16, 2010
  28. Jakub NarebskiMay 18, 2010
  29. Petr BaudisMay 16, 2010
  30. Petr BaudisMay 15, 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.