diff --git a/configs/http.conf.sample b/configs/http.conf.sample index 01b57752563a83906e16ec76418735d89c3a9e47..19f96ca9aba1cdc7829b7d909eacfb91ca4e620a 100644 --- a/configs/http.conf.sample +++ b/configs/http.conf.sample @@ -30,11 +30,11 @@ bindaddr=127.0.0.1 ; ; 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, diff --git a/main/http.c b/main/http.c index 98eaa5c9b043af210b8ee17bd3fde18d801cb197..14293c5d0fac79afb0364bab02c5b79ed7865182 100644 --- a/main/http.c +++ b/main/http.c @@ -817,7 +817,10 @@ static void add_redirect(const char *value) 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);