mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-06 12:36:58 +00:00
Revert tilghman and pari's code changes, as
we do NOT need to uri_decode in manager. (if I sent core%20show%20channels from a telnet session, it should be interpreted literally, however, if I send that from an http session, it should be decoded, which is the behaivor now) git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@133770 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -1270,8 +1270,7 @@ static enum error_type handle_updates(struct mansession *s, const struct message
|
||||
{
|
||||
int x;
|
||||
char hdr[40];
|
||||
const char *action, *cat, *match, *line, *tmp;
|
||||
char *var, *value;
|
||||
const char *action, *cat, *var, *value, *match, *line;
|
||||
struct ast_category *category;
|
||||
struct ast_variable *v;
|
||||
struct ast_str *str1 = ast_str_create(16), *str2 = ast_str_create(16);
|
||||
@@ -1287,23 +1286,10 @@ static enum error_type handle_updates(struct mansession *s, const struct message
|
||||
snprintf(hdr, sizeof(hdr), "Cat-%06d", x);
|
||||
cat = astman_get_header(m, hdr);
|
||||
snprintf(hdr, sizeof(hdr), "Var-%06d", x);
|
||||
if ((tmp = astman_get_header(m, hdr))) {
|
||||
ast_str_make_space(&str1, strlen(tmp) + 1);
|
||||
strcpy(str1->str, tmp);
|
||||
var = str1->str;
|
||||
ast_uri_decode(var);
|
||||
} else {
|
||||
var = "";
|
||||
}
|
||||
var = astman_get_header(m, hdr);
|
||||
snprintf(hdr, sizeof(hdr), "Value-%06d", x);
|
||||
if ((tmp = astman_get_header(m, hdr))) {
|
||||
ast_str_make_space(&str2, strlen(tmp) + 1);
|
||||
strcpy(str2->str, tmp);
|
||||
value = str2->str;
|
||||
ast_uri_decode(value);
|
||||
} else {
|
||||
value = "";
|
||||
}
|
||||
value = astman_get_header(m, hdr);
|
||||
|
||||
if (!ast_strlen_zero(value) && *value == '>') {
|
||||
object = 1;
|
||||
value++;
|
||||
|
Reference in New Issue
Block a user