summaryrefslogtreecommitdiff
path: root/fw/src/http.c
AgeCommit message (Collapse)Author
14 daysfw: js: Add web frontend to display heartbeatxengineering
This makes it transparent to the user that there is an active connection to the firmware. If the connection is broken the user notices that quickly and can re-load the page.
14 daysfw: ws: Add WebSocket interfacexengineering
The primary interface for this firmware was so far HTTP. This protocol is not suitable for small and bidirectional messages which are time-critical. If something like this needs to be implemented with HTTP the best approach is likely long-polling which at least makes it possible for the server / the firmware to send data to the client / user as reaction to an event like a closed door sensor. TCP would fix this issue and is a good choice. Nevertheless web clients are not allowed to open TCP connections for security purposes. Thus the WebSocket protocol was created to fill this gap. To not duplicate the any effort the WebSocket API should be used for small, time-critical messages for all clients (one with TCP support like CLI tools as well as web clients). HTTP is still kept to provide a web page but also for functionality where HTTP is more suitable like firmware uploads.
14 daysfw: http: Add /favicon.ico handlerxengineering
Common browsers always request this URL. Not responding to it shows up as an error. To silence this error report the firmware just responds with HTTP 204 No Content since a favicon is currently not available.
14 daysfw: http: Add HTML resource /xengineering
This provides the index HTML page.