about summary refs log tree commit diff
Commit message (Collapse)AuthorAgeFilesLines
* fix(main): set PATH_INFO=/ for index HEAD mastersternenseemann2020-12-281-1/+1
| | | | | We assume that SCRIPT_NAME does not end in a slash or is empty and thus PATH_INFO _must_ start with a slash.
* fix(templates/simple): fix link back if script_name is emptysternenseemann2020-12-281-2/+9
|
* fix(main): correct routing sanity checksternenseemann2020-09-191-2/+6
|
* refactor(headers): allow multiple inclusionssternenseemann2020-09-198-6/+48
|
* refactor(treewide): prefix public/internal API with sternenblog/sternenseemann2020-08-2618-19/+24
|
* doc(stringutil): init docssternenseemann2020-08-252-1/+25
|
* doc(timeutil): init docs for timeutilsternenseemann2020-08-252-5/+36
|
* fix(timeutil): let flocaltime return actual lensternenseemann2020-08-251-1/+11
| | | | Behavior now more consistent what you'd expect from strftime
* doc(template): fix field doc of struct template_datasternenseemann2020-08-251-5/+5
|
* doc(cgiutil): document server_urlsternenseemann2020-08-252-1/+17
|
* chore(TODO): remove tasks finished by edd4a7e4d5f4d5be6a5fc9db3f7173fc8dc81616sternenseemann2020-08-251-1/+0
|
* feat(template): pass context to template, simplify apisternenseemann2020-08-254-135/+142
| | | | | | | | | | | | | | | | | New struct template_data is passed to all template functions, allowing to e. g. reflect the current entry in template_header and to unify template_single_entry, template_index_entry, template_error into template_main which switches behavior depending on data.page_type. BREAKING CHANGES: * remove template_single_entry, template_index_entry, template_error; replaced by template_main * template_header, template_footer: type change refactor(templates/simple): use xml_escape where applicable feat(templates/simple): navigate using header / entry titles feat(templates/simple): change <title> depending on subpage
* feat(main): add asserts to catch bugs in routingsternenseemann2020-08-251-0/+9
| | | | These assert runtime assumptions
* fix(main): call correct entry templatesternenseemann2020-08-251-1/+5
|
* feat(rss,atom): gen abs paths from webroot if no external_urlsternenseemann2020-08-251-22/+23
|
* refactor(main): rework routing to minimize code duplicationsternenseemann2020-08-252-109/+103
|
* refactor(timeutil): remove debug outputsternenseemann2020-08-251-2/+0
|
* feat(rss,atom): use SERVER_{NAME,PORT} for external URLsternenseemann2020-08-256-42/+85
|
* chore(TODO): update taskssternenseemann2020-08-251-2/+2
|
* fix(send_standard_headers): don't read from uninitialized memorysternenseemann2020-08-251-1/+6
|
* fix(entry): unget, not get tex in free_entrysternenseemann2020-08-251-1/+2
| | | | fix(entry): initialize full struct in make_entry
* doc(sternenblog.cgi): reflect changes to configurationsternenseemann2020-08-241-15/+69
|
* doc(sternenblog.cgi): fix SEE ALSO sectionsternenseemann2020-08-241-4/+4
|
* refactor(timeutil): remove unnecessary localtime callsternenseemann2020-08-241-2/+0
|
* feat(rss,atom): mmap on demand like in blog_indexsternenseemann2020-08-245-87/+105
| | | | | | | | | | | | * entry * add entry_unget_text: implements unmmaping * free_entry: now expects pointer * index: adjust for entry changes * main * adjust for entry changes * use on demand mmaping in blog_atom and blog_rss * shell.nix * add strace for mmap debugging
* fix(index): use int for free_indexsternenseemann2020-08-242-3/+3
| | | | | Prevents integer overflow and consequently segfaults the return value of make_index is used directly.
* fix(stringutil): skip strings that are NULLsternenseemann2020-08-241-10/+12
| | | | Prevents segfaults with careless uses
* chore(TODO): keep tzset() based flocaltimesternenseemann2020-08-241-1/+2
| | | | | Seems reliable after fix and further testing, probably cleaner than strftime string manipulation.
* chore(shell.nix): add dev environmentsternenseemann2020-08-241-0/+7
|
* feat(main): add simple caching support via max-agesternenseemann2020-08-243-43/+51
| | | | | | * remove support for RSS <ttl> element, remove BLOG_RSS_TTL * add BLOG_CACHE_MAX_AGE, send Cache-Control headers * TODO: more sophisticated caching support? ETag support?
* doc(config.example.h): fix documentation output for BLOG_TITLE and BLOG_RSS_TTLsternenseemann2020-08-241-0/+7
|
* feat(main): add atom feedsternenseemann2020-08-246-40/+172
| | | | | feat(templates/simple.c): link to atom feed as well refactor(templates/simple.c): replace make_link with catn_alloc
* fix(Makefile): entry.o depends on config.hsternenseemann2020-08-241-0/+2
|
* fix(timeutil): only UTC if no daylight savingsternenseemann2020-08-241-1/+1
| | | | Fixes output for BST mostly
* feat(entry): allow disabling the strict access checksternenseemann2020-08-242-5/+24
|
* refactor(config.example.h): restructuresternenseemann2020-08-241-16/+20
|
* refactor(stringutil): add function catn_alloc to ease url building in main.csternenseemann2020-08-218-31/+73
| | | | | | | | | * bitutil.{c,h} → stringutil.{c,h} (more appropriate) * new function catn_alloc(size_t n, ...) which concats `n` given strings into an dynamically allocated buffer, mostly useful for building URLs which is done in blog_rss. may be a possibility to use in entry.c, but code there might be too specific.
* refactor(templates/simple): use timeutil for time formattingsternenseemann2020-08-211-9/+3
|
* feat(timeutil): output proper RFC3339 format for atomsternenseemann2020-08-217-33/+95
| | | | | | | | Previously, since we used strftime %z it'd output an offset as +HHMM while RFC3339 requires +HH:MM. Currently we implement outputting this manually which proved to be non-trivial because of the tzset() API. This probably should be improved in the future since I suspect it produces incorrect results in some edge cases.
* feat(rss): minor improvements and refactor time formattingsternenseemann2020-08-204-29/+71
| | | | | | | * add timeutil.{c,h}: utility for formatting timestamps * wrap feed description in CDATA * use xml_escaped where applicable * use time of latest entry for lastBuildDate
* doc(README): reflect current (unstable) statesternenseemann2020-08-183-16/+49
|
* doc(sternenblog.cgi): add preliminary user documentationsternenseemann2020-08-142-1/+308
|
* feat(entry): url encode entry.linksternenseemann2020-08-123-2/+141
| | | | | This makes it possibly to use spaces and some reserved characters of URLs in post filenames.
* fix(index): resolve memory leak on make_index errorsternenseemann2020-08-121-6/+4
|
* refactor(entry): move internal http_errno to cgiutilsternenseemann2020-08-113-16/+29
|
* fix(treewide): use same type when comparingsternenseemann2020-08-113-4/+4
|
* feat(xml): add support for CDATA sectionssternenseemann2020-08-113-27/+131
| | | | | | | | | | * xml_open_cdata and xml_close_cdata add convenient support for this * tracked on stack using the newly introduced field type which is of enum xml_tag_type which may either be XML_NORMAL_TAG or XML_CDATA. * xml_close_all and xml_close_including also support closing CDATA sections now * xml_close_including now behaves like xml_close_all if NULL is given as tag, xml_close_all newly aliased to xml_close_including(..., NULL)
* refactor(xml): simplify warnings using macrosternenseemann2020-08-111-28/+18
| | | | | also point stack head to old stack if malloc fails so del_xml_context can still free it.
* feat(xml): support for escapingsternenseemann2020-08-113-13/+80
| | | | | | BREAKING CHANGE: xml_open_tag_attrs() now outpus its attribute values xml escaped
* docs(cgiutil): you can keep pointers to literalssternenseemann2020-08-111-2/+1
|