t/misc/die-not-goto: create TopGit-controlled branch
[git/gitweb.git] / .topmsg
blob3f1015d2f31d40226c73d6ea686ca191952f5304
1 Subject: [PATCH] gitweb.perl: use die not goto
3 Using "goto DONE_GITWEB" instead of throwing an exception
4 with die causes any optimized CGI processing (mod_perl,
5 FCGI, PSGI, etc.) to be aborted prematurely.
7 This can happen for various reasons that are not fatal,
8 rather they are simply indicating that all output has
9 been written for the current request (perhaps an object
10 wasn't found) and the current request is done.
12 These conditions are part of normal CGI processing and
13 SHOULD NOT abort the script entirely, rather just finish
14 up the current request.
16 What happens when the script is aborted entirely is that
17 the host process (mod_perl, mod_fcgid, etc.) must detect
18 the error and then spawn another copy of the script.
20 That all takes time and devastates throughput unnecessarily.
22 Instead throw an exception using die in these cases and
23 catch it with eval to indicate that the current request
24 has ended and the next should begin.
26 Signed-off-by: Kyle J. McKay <mackyle@gmail.com>