Commits


amused-web: http_reply: use http_* instead of bufio_compose_*


amused-web: allocate lazily the (double) buffer for chunking


amused-web: free ws secret as soon as possible


amused-web: parse POST data in bufio' rbuf Add a proper upper limit (4096 seems enough for now) and safely NUL-terminate the rbuf. The idea is to later drop the clt->buf static buffer and allocate it on demand only when we need to do (http) chunking.


fmt


amused-web: add websocket support; send forms via js if available This allows amused-web to stay in sync using websockets (much like existing amused clients watch `amused monitor') and sends the forms in the background to avoid refreshing the page. Still missing is reopening the websocket, maybe blocking the UI in that case and showing the progress.


amused-web: simplify http_reply


amused-web: rename variable for clarity


amused-web: strip the query from the request path


amused-web: set http.[ch] as public domain code


amused-web: set the chunking earlier


amused-web: simplify parsing of the first line of the request


amused-web: log the HTTP version too


amused-web: reply with the right HTTP version


amused-web: rework client handling on top of bufio / ev