]> git.sesse.net Git - cubemap/commitdiff
Fix a problem where streams with paths exactly 7 characters long get broken buffering...
authorSteinar H. Gunderson <sgunderson@bigfoot.com>
Wed, 24 May 2017 19:24:57 +0000 (21:24 +0200)
committerSteinar H. Gunderson <sgunderson@bigfoot.com>
Wed, 24 May 2017 19:24:57 +0000 (21:24 +0200)
server.cpp

index afaab9be6a3cfb0f464de29582554744e8faac70..608ed6b70b504e0d0ff4152f77568b6a5fac1236 100644 (file)
@@ -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 {