if string outside of {} contains :// consider that input to mean the url such as {foo=bar}http://www.host.com/test.cgi vs {foo=bar,url=http://www.host.com/test.cgi}

This commit is contained in:
Anthony Minessale 2012-01-17 16:44:48 -06:00
parent 34c0cbeb47
commit 9c8b02e12b
1 changed files with 3 additions and 0 deletions

View File

@ -2077,6 +2077,9 @@ SWITCH_STANDARD_APP(httapi_function)
if (!zstr(data)) {
switch_event_create_brackets((char *)data, '{', '}', ',', &params, &parsed, SWITCH_TRUE);
if (!switch_event_get_header(params, "url") && !zstr(parsed) && switch_stristr("://", parsed)) {
switch_event_add_header(params, SWITCH_STACK_BOTTOM, "url", parsed);
}
}
if ((client = (client_t *) switch_channel_get_private(channel, "_HTTAPI_CLIENT_"))) {