diff options
author | Omar Polo <op@omarpolo.com> | 2023-10-15 15:06:34 +0000 |
---|---|---|
committer | Omar Polo <op@omarpolo.com> | 2023-10-15 15:06:34 +0000 |
commit | c7bcd4a8a9b22a4b28136e24069279cb93b1e43d (patch) | |
tree | c42aa12a8c82f68a4ef72c2fc933ca2cc9c5f834 /gg.c | |
parent | 4db22ea6547cf324376dc9561e01b84e78825e4d (diff) |
gg: exit with the gemini response code
0 is still used for 2X replies, and "external" failures (e.g.
network, tls, ...) are still using exit code 1. Gemini non-2x
replies now get their response code reported as-is as status code.
Diffstat (limited to 'gg.c')
-rw-r--r-- | gg.c | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -428,6 +428,7 @@ main(int argc, char **argv) #endif code = get(*argv); - - return code < 20 || code >= 30; + if (code >= 20 && code < 30) + return 0; + return code; } |