diff options
author | twilson <twilson@f38db490-d61c-443f-a65b-d21fe96a405b> | 2008-03-31 20:45:05 +0000 |
---|---|---|
committer | twilson <twilson@f38db490-d61c-443f-a65b-d21fe96a405b> | 2008-03-31 20:45:05 +0000 |
commit | 4bb7658005ec797e0abc1e512cc2dca950c2c93a (patch) | |
tree | 10897d99f14121383e329cd894e7cf5c60bbc8b0 /main/http.c | |
parent | feb771232045f798ada7814ba7c6eb689d8b5675 (diff) |
Handle blank prefix= in http.conf
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@112033 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'main/http.c')
-rw-r--r-- | main/http.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/main/http.c b/main/http.c index dc8814b55..1723fe4e7 100644 --- a/main/http.c +++ b/main/http.c @@ -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); |