gmid/regress
Omar Polo 35744950aa simplify handle_cgi
Now that I got rid of the enum+switch, adding more state is easier.
Before, we used an hack to remember if we had read the CGI reply or
not (c->code = -1).

This introduces a new state, handle_cgi_reply that reads the CGI
script reply, logs it, and only then switches to handle_cgi.
handle_cgi itself is cleaner, now it only reads into c->sbuf and send
what it had red.

We even get, almost for free, the 42 error.  If read exists with -1 or
0 from in handle_cgi_reply, we return a proper error to the client.
We can extend this further in the future and also try to validate the
CGI reply (for now we're only looking for a \n).
2021-02-01 22:04:51 +00:00
..
Makefile use starts_with in puny.c 2021-01-27 15:35:09 +00:00
err brand new regress suite 2021-01-22 16:48:04 +00:00
fill-file.c use a c program to fill the file 2021-01-22 17:18:55 +00:00
hello brand new regress suite 2021-01-22 16:48:04 +00:00
invalid fix test portability 2021-01-23 17:44:23 +00:00
iri_test.c more IRI tests 2021-01-29 18:52:36 +00:00
puny-test.c parse_err is a const pointer 2021-02-01 19:58:04 +00:00
runtime simplify handle_cgi 2021-02-01 22:04:51 +00:00
serve-bigfile test CGI with big files 2021-01-24 10:24:34 +00:00
sha fix for sha256sum 2021-01-22 17:14:40 +00:00
slow brand new regress suite 2021-01-22 16:48:04 +00:00