mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-18 10:51:40 +00:00
Use spaces as a separator for the redirect option to improve readability
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@48947 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -30,11 +30,11 @@ bindaddr=127.0.0.1
|
|||||||
;
|
;
|
||||||
; Redirect one URI to another. This is how you would set a
|
; Redirect one URI to another. This is how you would set a
|
||||||
; default page.
|
; default page.
|
||||||
; Syntax: redirect=<from here>=<to there>
|
; Syntax: redirect=<from here> <to there>
|
||||||
; For example, if you are using the Asterisk-gui,
|
; For example, if you are using the Asterisk-gui,
|
||||||
; it is convenient to enable the following redirect:
|
; 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
|
; HTTPS support. In addition to enabled=yes, you need to
|
||||||
; explicitly enable ssl, define the port to use,
|
; explicitly enable ssl, define the port to use,
|
||||||
|
@@ -817,7 +817,10 @@ static void add_redirect(const char *value)
|
|||||||
unsigned int total_len;
|
unsigned int total_len;
|
||||||
|
|
||||||
dest = ast_strdupa(value);
|
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) {
|
if (!dest) {
|
||||||
ast_log(LOG_WARNING, "Invalid redirect '%s'\n", value);
|
ast_log(LOG_WARNING, "Invalid redirect '%s'\n", value);
|
||||||
|
Reference in New Issue
Block a user