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 afaab9b..608ed6b 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 {