Commits


gotwebd: free all allocated fields of repo_tag got_get_repo_tags needs some tweaking to how tag_commit is allocated too. ok stsp@


gotwebd: fix possible leaks when handling errors all very unlikely. part of a bigger diff that's ok stsp@


gotwebd: minor tweaks drop: - a tautological s[strlen(s)] == '\0' - a few duplicates checks - a lone if (error) when it's always NULL - an extra NULL check part of a bigger diff that's ok stsp@


fix dup(2) error checking in got_gotweb_openfile()


in got_operations.c, remove error variables which were only used to return NULL


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


gotwebd: fix memory leak introduced in d927f8c 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: 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!


fix overflow in blame callback spotted by noticing gotwebd crashing on some blame requests. Diff from stsp@ with a fix from tracey@, I'm committing it only because he is short on time. ok stsp@


gotwebd: fix alternate colors in tree entries it was broken in 7ecc454 because now we're emitting tags with multiple `class' attributes (by mistake) and only the first one is used. However, instead of fixing the HTML `class' attribute, use a CSS selector to alternate the background colors. 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: simplify got_output_file_blob loop there's no need to distinguish between plain text blob and a binary one in the output, just send it chunk by chunk. ok tracey@


gotwebd: simplify isbinary


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