This document keeps track of things, which still need to be taken care of.
To do [0/13]
- [ ] Currently the implementation uses bytevector procedures to read static
files and create responses with their content. Probably Guile's ~sendfile~
(see [[https://www.gnu.org/software/guile/manual/html_node/File-System.html][File-System]] in the Guile manual) is a more performant way of serving
static files.
- [ ] Keyboard interrupt (C-c) are not yet handled in a way that cleanly shuts
down the server.
- [ ] The various modules use different module systems. They should only use one
module system.
- [ ] Use exception handling instead of asking whether a file exists and then
continuing to read the file without exception handling.
- Reason: There is a chance that a file could be deleted immediately after an
existence check and before the rest of the logic that depends on the file
existing is executed.
- [ ] No need to check, whether a path has any special parts in it, because the
file procedures of Guile do not interpret them in any special way as Bash
would do anyway. Only need to make sure, that a path is a subpath of the
static directory.
- [ ] Check out
https://hg.sr.ht/~arnebab/wispserve/browse/wispserve/serve.w
which deals with reading big files. It might be that simply reading whole
files as bytevectors (unbuffered) will run into problems when reading huge
files. Also: What about using ~sendfile~ instead?
- [ ] static location is not recognized as such (see logs when running).
- [ ] serve images correctly. perhaps this helps?
- [ ] XML pretty formatting / indentation before sending
Could try using xmllint command line tool from inside GNU Guile as follows:
#+begin_src scheme
(define (open-xmllint-pipe filename)
(open-output-pipe
(string-append "xmllint --format --output " filename " -")))
#+end_src
- [ ] properly serve image files
Apparently the encoding needs to be not utf-8, but instead ISO-8859-1
. It
seems this is for the usual encoding for binary data.
See: https://hg.sr.ht/~arnebab/wispserve/browse/wispserve/serve.w?rev=ab4c95b7a9ff#L476 and https://hg.sr.ht/~arnebab/wispserve/browse/wispserve/serve.w?rev=ab4c95b7a9ff#L455
- [ ] does ice-9 pretty-print help with formatting XML strings?
- [ ] linked content keine haftung
Ideas
- pull meetup data using a cronjob in the backend