summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2021-09-26Update README with security and bugs sectionsHEADmasterRussell King
Update the readme file to add a section on security (or lack of!) and known bugs. Signed-off-by: Russell King <rmk@armlinux.org.uk>
2021-09-26resource: provide "backend" status eventsRussell King
Provide status events for the backend connection state, so the web clients know whether anything is connected and when the last connect or disconnect event happened. Signed-off-by: Russell King <rmk@armlinux.org.uk>
2021-09-15event-httpd: parse request-line when receivedRussell King
Parse the request line when it is received and save any errors encountered which will be returned to the client after the headers have been received. Signed-off-by: Russell King <rmk@armlinux.org.uk>
2021-09-14event-httpd: split out request parsingRussell King
Split out the parsing of the request line and headers into a separate function to simplify how we free the received line and deal with receiving the next line of the request. Signed-off-by: Russell King <rmk@armlinux.org.uk>
2021-09-14Fix double-close of clientRussell King
respond_error() already closes the client and frees the structures, so we should not call close_client() after calling respond_error(). Signed-off-by: Russell King <rmk@armlinux.org.uk>
2021-09-11Restrict updates to the newest updaterRussell King
Prevent old update connections from providing updates, closing them if they attempt an update. In doing so, this also limits resource usage when we have multiple updaters connected (which should never happen.) Signed-off-by: Russell King <rmk@armlinux.org.uk>
2021-09-11resource: split resource operations from resource object structureRussell King
Move the resource operations out of the resource object structure and make them const. Signed-off-by: Russell King <rmk@armlinux.org.uk>
2021-09-11event-httpd: free the line read from the clientRussell King
g_data_input_stream_read_line_finish() returns a string that needs to be freed when we are done with it. Ensure this happens. Signed-off-by: Russell King <rmk@armlinux.org.uk>
2021-09-11resource: split resource object handlingRussell King
Move the low-level resource object handling out of the interface functions. Signed-off-by: Russell King <rmk@armlinux.org.uk>
2021-09-11event-httpd: make GString argument constRussell King
respond_chunk() does not change or take ownership of the GString, so make this argument const. Signed-off-by: Russell King <rmk@armlinux.org.uk>
2021-04-16resource: move the event formatting to object_v1_updateRussell King
Move the text/event-stream formatting to object_v1_update() from object_v1_send() to avoid the formatting and memory allocation overhead per client. Signed-off-by: Russell King <rmk@armlinux.org.uk>
2021-04-16build: split install targetRussell King
Split the install target into two separate rules so we can install just the binary for updates. Signed-off-by: Russell King <rmk@armlinux.org.uk>
2021-04-16event-httpd: add event httpd supportRussell King
Add event httpd, which is a small and basic http server designed to provide server sent events to clients. The server accepts updates through a simple "UPDATE" method which are then broadcast to clients listening using the "GET" method. Signed-off-by: Russell King <rmk@armlinux.org.uk>