]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Handle blank prefix= in http.conf
authorTerry Wilson <twilson@digium.com>
Mon, 31 Mar 2008 20:45:05 +0000 (20:45 +0000)
committerTerry Wilson <twilson@digium.com>
Mon, 31 Mar 2008 20:45:05 +0000 (20:45 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@112033 65c4cc65-6c06-0410-ace0-fbb531ad65f3

main/http.c

index dc8814b552de2e76d1b9ca797702bb64c1912736..1723fe4e74099785fa5e48bd575a22e08aae1bae 100644 (file)
@@ -683,8 +683,8 @@ static struct ast_str *handle_uri(struct ast_tcptls_session_instance *ser, char
                goto cleanup;
        }
 
-       /* We want requests to start with the prefix and '/' */
-       if ((l = strlen(prefix)) && !strncasecmp(uri, prefix, l) && uri[l] == '/') {
+       /* We want requests to start with the (optional) prefix and '/' */
+       if (((l = strlen(prefix)) || !*prefix) && !strncasecmp(uri, prefix, l) && uri[l] == '/') {
                uri += l + 1;
                /* scan registered uris to see if we match one. */
                AST_RWLIST_RDLOCK(&uris);