From: Steinar H. Gunderson Date: Wed, 24 May 2017 19:24:57 +0000 (+0200) Subject: Fix a problem where streams with paths exactly 7 characters long get broken buffering... X-Git-Tag: 1.3.2~1 X-Git-Url: https://git.sesse.net/?p=cubemap;a=commitdiff_plain;h=28adfb9cb630025c1584952074ab7d93042226bd Fix a problem where streams with paths exactly 7 characters long get broken buffering behavior (served from start of backlog). --- diff --git a/server.cpp b/server.cpp index afaab9b..608ed6b 100644 --- a/server.cpp +++ b/server.cpp @@ -653,7 +653,7 @@ int Server::parse_request(Client *client) string url = request_tokens[1]; client->url = url; - if (url.find("?backlog") == url.size() - 8) { + if (url.size() > 8 && url.find("?backlog") == url.size() - 8) { client->stream_pos = -2; url = url.substr(0, url.size() - 8); } else {