Commits


gotwebd: plug two memory leak and drop unneeded ternary ok tracey@


get rid of (null) on the index page. ok stsp


gotwebd: use SCRIPT_NAME to derive URLs This makes gotwebd use SCRIPT_NAME instead of the DOCUMENT_ROOT fastcgi param to generate the links to the assets and changes some links so every page is consistently linked with a relative URL. It allows to drop the `root "/"' in the location for fastcgi and, as a bonus, also makes possible to run gotwebd on non "/" paths. ok stsp@


gotwebd: fix NULL deref on ENOMEM in gotweb_process_request ok tracey@


gotwebd: add CSP policy ok tracey@


gotwebd: fix for possible NULL beign passed to fcgi_printf reported by and ok tracey@


gotwebd: make sure to escape possibly unsafe strings this fixes only the HTML escaping of strings, the urlencode is still missig. while here also plug a memory leak in gotweb_render_branches and drop some needless ternary operators. ok tracey@


gotwebd: minor tweaks to the generated HTML spotted by validator.w3.org: - use target="_blank" instead of `_sotd' - drop `alt' attributes in `a' tags This fixes all the errors reported; only a warning suggesting to add a `lang' attribute on the <html> tag remains.


gotwebd: add fcgi_printf instead of fcgi_gen_response which outputs only a fixed strings provide a printf-like fcgi_printf: it greatly simplifies the generation of the HTML pages. While here also (probably) fix some HTML errors: the output was verified with the W3C validator and it's correct (in the sense that the tags are properly closed, there are still some other things the validator complains about.) ok/encouragement baseprime@, ok jamsek Thanks for reading such a boring diff!


gotwebd: do not allocate server/socket list heads separately ok millert@


gotwebd: fix double free in gotweb_process_request don't free the querystring, it's already done later by fcgi_celanup_request. ok tracey@


gotwebd: switch some HTML IDs to classes HTML IDs are meant to be unique across the page. While here fix two small errors in the generated HTML (one missing closing div and one extra.) ok tracey@


gotwebd: fix double Content-Type (and the typo) ok tracey@


gotwebd: fix potential type mismatch between format specifier and argument ok tracey


gotwebd: explicitly include <sys/queue.h>