mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-05 20:20:07 +00:00
Oops, missed the actual decoding part.
(closes issue #18046) Reported by: wdoekes git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@301008 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -654,6 +654,22 @@ static int acf_curl_helper(struct ast_channel *chan, const char *cmd, char *info
|
|||||||
if (!piece) {
|
if (!piece) {
|
||||||
piece = "";
|
piece = "";
|
||||||
}
|
}
|
||||||
|
/* Do this before the decode, because if something has encoded
|
||||||
|
* a literal plus-sign, we don't want to translate that to a
|
||||||
|
* space. */
|
||||||
|
if (hashcompat == HASHCOMPAT_LEGACY) {
|
||||||
|
int i;
|
||||||
|
for (i = 0; name[i]; i++) {
|
||||||
|
if (name[i] == '+') {
|
||||||
|
name[i] = ' ';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
for (i = 0; piece[i]; i++) {
|
||||||
|
if (piece[i] == '+') {
|
||||||
|
piece[i] = ' ';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
ast_uri_decode(piece);
|
ast_uri_decode(piece);
|
||||||
ast_uri_decode(name);
|
ast_uri_decode(name);
|
||||||
ast_str_append(&fields, 0, "%s%s", rowcount ? "," : "", name);
|
ast_str_append(&fields, 0, "%s%s", rowcount ? "," : "", name);
|
||||||
|
Reference in New Issue
Block a user