[svn-commits] russell: trunk r48947 - in /trunk: configs/http.conf.sample main/http.c

svn-commits at lists.digium.com svn-commits at lists.digium.com
Sun Dec 24 14:01:03 MST 2006


Author: russell
Date: Sun Dec 24 15:01:02 2006
New Revision: 48947

URL: http://svn.digium.com/view/asterisk?view=rev&rev=48947
Log:
Use spaces as a separator for the redirect option to improve readability

Modified:
    trunk/configs/http.conf.sample
    trunk/main/http.c

Modified: trunk/configs/http.conf.sample
URL: http://svn.digium.com/view/asterisk/trunk/configs/http.conf.sample?view=diff&rev=48947&r1=48946&r2=48947
==============================================================================
--- trunk/configs/http.conf.sample (original)
+++ trunk/configs/http.conf.sample Sun Dec 24 15:01:02 2006
@@ -30,11 +30,11 @@
 ;
 ; Redirect one URI to another.  This is how you would set a
 ; default page.  
-;   Syntax: redirect=<from here>=<to there>
+;   Syntax: redirect=<from here> <to there>
 ; For example, if you are using the Asterisk-gui,
 ; it is convenient to enable the following redirect:
 ;
-;redirect=/=/asterisk/static/config/cfgadvanced.html
+;redirect = / /asterisk/static/config/cfgadvanced.html
 ;
 ; HTTPS support. In addition to enabled=yes, you need to
 ; explicitly enable ssl, define the port to use,

Modified: trunk/main/http.c
URL: http://svn.digium.com/view/asterisk/trunk/main/http.c?view=diff&rev=48947&r1=48946&r2=48947
==============================================================================
--- trunk/main/http.c (original)
+++ trunk/main/http.c Sun Dec 24 15:01:02 2006
@@ -817,7 +817,10 @@
 	unsigned int total_len;
 
 	dest = ast_strdupa(value);
-	target = strsep(&dest, "=");
+	dest = ast_skip_blanks(dest);
+	target = strsep(&dest, " ");
+	target = ast_skip_blanks(target);
+	target = strsep(&target, " "); /* trim trailing whitespace */
 
 	if (!dest) {
 		ast_log(LOG_WARNING, "Invalid redirect '%s'\n", value);



More information about the svn-commits mailing list