Commits
- Commit:
35744950aa0953bee3035400e8035af844a675ba
- From:
- Omar Polo <op@omarpolo.com>
- Date:
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).
- Commit:
92da82858b6b8fe44f34e582967767d7f4d32f4d
- From:
- Omar Polo <op@omarpolo.com>
- Date:
document the DFA
- Commit:
112802ea3116b6e11a70d6060e6e238495498bbc
- From:
- Omar Polo <op@omarpolo.com>
- Date:
client state machine: function pointers instead of enum+switch
- Commit:
2fafa2d23e5607def335902b7a9d10a9de5247a9
- From:
- Omar Polo <op@omarpolo.com>
- Date:
bring the CGI implementation in par with GLV-1.12556
- Commit:
6016a593a32c4f3f27ed3e7892a1595d631fcbef
- From:
- Omar Polo <op@omarpolo.com>
- Date:
invert the location precedence: first match wins
It's how httpd(8) does it, and it allows us to call fnmatch less time
- Commit:
a2fd80132769e268bee6af754eca6eb13035de78
- From:
- Omar Polo <op@omarpolo.com>
- Date:
puny_decode: set an error string
- Commit:
35cf19e3f36688927ff28aa2b45108cda5f9a8d8
- From:
- Omar Polo <op@omarpolo.com>
- Date:
punycode: refactoring
use the correct term "label" instead of "component" when speaking
about the parts of a hostname. Also, fix the sizes for max hostname
and label.
- Commit:
473e4531d5c55ef25dde8df5b57ef503ef1aa218
- From:
- Omar Polo <op@omarpolo.com>
- Date:
delete unused constant
- Commit:
ef0f2ae88ceef043eff03d0b4560f76df607eac7
- From:
- Omar Polo <op@omarpolo.com>
- Date:
remove unused function
- Commit:
13ed2fb63f4915da96fcc7f8022480561a87567e
- From:
- Omar Polo <op@omarpolo.com>
- Date:
improve configuration parsing error
- Commit:
fe5967cd02fce0a3b5db0dc4f05ff342083ba1d0
- From:
- Omar Polo <op@omarpolo.com>
- Date:
const-ify strings in struct location
- Commit:
44ee1bac8bc4ca2f216297d00ee6677f49fe3342
- From:
- Omar Polo <op@omarpolo.com>
- Date:
use starts_with in puny.c
- Commit:
c4f682f8559b184d64b04aece37d3d2980859832
- From:
- Omar Polo <op@omarpolo.com>
- Date:
trim_req_iri: set error string
- Commit:
46af8c6cfe1f1ec15d93bc58791f4596c610785b
- From:
- Omar Polo <op@omarpolo.com>
- Date:
drop the daemon config in favour of the -f flag
Now it daemonize by default when running with a config, unless the -f
flag is given.
- Commit:
7957cbd9aad6ace179287b2ddcbae0b14a25a90d
- From:
- Omar Polo <op@omarpolo.com>
- Date:
const-ify puny_decode (and add puny.c)