diff options
author | Richard Maw <richard.maw@gmail.com> | 2016-12-18 21:01:49 +0000 |
---|---|---|
committer | Richard Maw <richard.maw@gmail.com> | 2016-12-18 21:52:49 +0000 |
commit | 4fb7da3e483e11a57188e946f6ea634d0928c4bc (patch) | |
tree | 06797340d3860dfb869d67b5913ee7ecd97484e5 | |
parent | 49df8959ce8f77665b317bb9dd0b21a277dfcf96 (diff) | |
download | gitano-4fb7da3e483e11a57188e946f6ea634d0928c4bc.tar.gz |
smart-http: Only generate Status 500 on non-exit of http-backend
If smart-http succeeds or fails it will produce its own message,
we only need to produce our own code if we don't even get that far.
-rw-r--r-- | bin/gitano-smart-http.cgi.in | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/bin/gitano-smart-http.cgi.in b/bin/gitano-smart-http.cgi.in index 94b35cd..dd14800 100644 --- a/bin/gitano-smart-http.cgi.in +++ b/bin/gitano-smart-http.cgi.in @@ -72,11 +72,11 @@ if request_method == "GET" or request_method == "POST" then start_log_level) end if cmdline and authorized then - local exit_code + local what, why - _, exit_code = repo:git_command{"http-backend"} + what, why = repo:git_command{"http-backend"} - if exit_code ~= 0 then + if what ~= "exit" then stdout:write("Status: 500 Internal Server Error\r\n\r\n") end else |