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

[RFC PATCH 1/2] gitweb: Go to DONE_REQUEST rather than DONE_GITWEB in die_error

From
Jakub Narebski <jnareb@gmail.com>
Date
Dec 13, 2010, 00:48 UTC
Message-ID
<20101213004644.9475.10102.stgit@localhost.localdomain>
In-Reply-To
<20101213004259.9475.87376.stgit@localhost.localdomain>

End the request after die_error finishes, rather than exiting gitweb instance (perhaps wrapped like in ModPerl::Registry or gitweb.psgi case).

Signed-off-by: Jakub Narebski <jnareb@gmail.com>
---
This patch was sent to git mailing list as a standalone RFC patch some
time ago.  This version doesn't change anything from previous version.

I am keeping this patch (even though it is not strictly necessary), to have DONE_REQUEST label, which I think can be quite useful, even if die_error wouldn't be using it starting from the following commit.

 gitweb/gitweb.perl |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/gitweb/gitweb.perl b/gitweb/gitweb.perl
index cfa511c..af45daa 100755
--- a/gitweb/gitweb.perl
+++ b/gitweb/gitweb.perl
@@ -1147,6 +1147,7 @@ sub run {
 
 		run_request();
 
+	DONE_REQUEST:
 		$post_dispatch_hook->()
 			if $post_dispatch_hook;
 
@@ -3669,7 +3670,7 @@ EOF
 	print "</div>\n";
 
 	git_footer_html();
-	goto DONE_GITWEB
+	goto DONE_REQUEST
 		unless ($opts{'-error_handler'});
 }
 
Previous: Jakub NarebskiNext: Jakub Narebski
Message 2 of 6 in “gitweb: die_error (error handling) improvements”
  1. 0/2 gitweb: die_error (error handling) improvementsJakub Narebski, Dec 13, 2010
  2. 1/2 gitweb: Go to DONE_REQUEST rather than DONE_GITWEB in die_errorJakub Narebski, Dec 13, 2010
  3. 2/2 gitweb: use eval + die for error (exception) handlingJakub Narebski, Dec 13, 2010
  4. J.H.Dec 13, 2010
  5. Jakub NarebskiDec 13, 2010
  6. Jakub NarebskiDec 13, 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.