Fix a crash when trying to get HLS fragments from a disconnected strema. After the last patch, we would try to serve HLS fragments even if the backend is down, but we had zeroed out the HTTP header, causing an assertion failure with HTTP/1.1 clients (and an invalid HTTP response for HTTP/1.0 clients). Fix by keeping the header and setting a special “unavailable” flag instead (which allows us to keep sending HLS fragments).
Enable RX support for kTLS. This bumps the TLS requirement to >= 4.17 (tested with 4.17.0-rc4), and doesn't really help all that much (neither in performance nor complexity), but there's no point in supporting a separate non-RX-capable path for 4.13 through 4.16. Includes updating tlse.c to the latest version.
Keep information about HLS downloads around for some time afterwards. Gives _much_ more precise statistics for HLS clients, as they tend to spend most of their time in idle (even with multiple connections).
Fix timeout behavior with persistent connections. We'd either never time out clients (if the expiry check happened while they were receiving a request) or time them out too soon (based on the connection time instead of the time of last request end).
Replace map with unordered_map nearly everywhere, for speed.
Add support for serving HLS playlists. This depends on the new Metacube PTS metadata block, which only Nageru >= 1.7.2 serves at the moment. Lightly tested with iOS and hls.js; does not work with VLC and mpv yet.
Add support for deduplicating headers/short responses. We don't do any of it right now, but it is relevant when we get HLS playlists, which we may very well want to share between clients.
Support HTTP/1.1 persistent connections (not that useful yet).
Use C++11 std::mutex and std::lock_guard instead of our RAII wrapper.
Use unique_ptr a few places instead of explicit delete.
Use C++11 right angle brackets.
Do some cleanup around EPOLL_CTL_MOD operations.
Add server-side TLS support, through kTLS. This, unfortunately, includes a (lightly patched) embedded copy of the TLS library TLSe in tlse/, since it doesn't really work in any other way.
Fix an issue where Metacube output would not include updated headers (e.g. on encoder restart).
Add suppor for raw (non-Metacube) inputs over HTTP. Only really useful for TS.
Rename ping to gen204, and change the response type to a 204 No Response, since that is a bit more appropriate than a dummy one.
Add a simple HTTP endpoint that returns a very short string. The intention is for clients to be able to probe the endpoint to figure out which server is the fastest. To this end, it supports CORS headers so that XHR is allowed to differentiate servers that are down from servers that respond properly.
Rename header_or_error to header_or_short_response, as it will soon be able to contain pongs. Similarly, rename the state from SENDING_ERROR to SENDING_SHORT_RESPONSE.
Respect prebuffering_bytes= on existing streams when reloading.
Make a comment more precise.