Commits


split out the various LDADD_* so we don't link everything to everything


fmt


s/handle_client/web_accept


use ev.c in amused-web too


add portability shim for timespecsub


add missing #include <time.h>


fix control_accept handling of ENFILE/EMFILE Not sure how it worked with libevent before, but the reschedule is wrong. We need to schedule a timer to re-add the event on the listening fd.


switch from libevent to a smaller, thin wrapper around poll() libevent is a very cool library, I like its APIs and enjoy using it. However, for amused it is maybe a bit too much since it doesn't deal with too many file descriptors. Amused only needs to monitor one fd for the player process and the currently connected clients. Given that it runs per-user locally, having more than a dozen of fds open is very, very rare.


amused-web: fix reading POST body Some clients seem to include CRLF in the POST' Content-length, some don't. Ignoring when clients send more data then advertised and stripping CRLF at the end works fine across firefox, w3m and netsurf.


amused-web: ensure that path is completely filled with NUL to the end


amused-web: introduce an helper to print the unexpected imsg


use Transfer-Encoding: chunked only on HTTP/1.1 w3m (HTTP/1.0) doesn't seem to like it.


fix the POST handling


add amused-web, a web interface to control amused It's a first stab at it, some planned features (like the search) are missing but the basic ones work. It's not hooked in the main build yet.


contrib/amusing: use fancy unicode characters for the controls taken from: https://en.wikipedia.org/wiki/Media_control_symbols