[asterisk-commits] twilson: trunk r112033 - /trunk/main/http.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Mon Mar 31 15:45:06 CDT 2008
Author: twilson
Date: Mon Mar 31 15:45:05 2008
New Revision: 112033
URL: http://svn.digium.com/view/asterisk?view=rev&rev=112033
Log:
Handle blank prefix= in http.conf
Modified:
trunk/main/http.c
Modified: trunk/main/http.c
URL: http://svn.digium.com/view/asterisk/trunk/main/http.c?view=diff&rev=112033&r1=112032&r2=112033
==============================================================================
--- trunk/main/http.c (original)
+++ trunk/main/http.c Mon Mar 31 15:45:05 2008
@@ -683,8 +683,8 @@
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);
More information about the asterisk-commits
mailing list