Fix handling of HTTP/S keep-alives (RIPD-556)