Commit Briefs
move the buffering from the fastcgi layer to the template (main)
Reduces the indirection in fcgi.c, starts to make the struct template opaque, simplifies the template usage. All with a net negative :-) reads fine to stsp@ (thanks!)
template: join subsequent tp_puts() calls
This greatly reduces the number of tp_puts() calls: gotwebd' pages.tmpl goes from 444 to 190. Otherwise, this doesn't produce other observable changes.
remove proc_ispeer()
unused, and was dropped by other copies of proc.c; reduces the diff with httpd' proc.c.
CHANGES for 0.3 (tags/0.3)
enable pledging of the main process
not particularly interesting (and to be fair also quite large) but it doesn't touch untrusted data: all it does is waiting for signals to either reload the config (and the socket) or terminate.
properly initialize the `lang' buffer
otherwise we end up using stack garbage when the gemini server doesn't send a `lang' attribute. Problem reported by Javier Bravo, thanks!
template: fix processing of "{" at end of line
add a regress for this case.