From: Anthony Minessale Date: Tue, 17 Jan 2012 22:44:48 +0000 (-0600) Subject: if string outside of {} contains :// consider that input to mean the url such as... X-Git-Tag: v1.2-rc1~19^2~1^2~40 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9c8b02e12bd9ccdf9f3597979cd32bcdb0877fd1;p=thirdparty%2Ffreeswitch.git 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} --- diff --git a/src/mod/applications/mod_httapi/mod_httapi.c b/src/mod/applications/mod_httapi/mod_httapi.c index d101c7d3bb..abcf430473 100644 --- a/src/mod/applications/mod_httapi/mod_httapi.c +++ b/src/mod/applications/mod_httapi/mod_httapi.c @@ -2077,6 +2077,9 @@ SWITCH_STANDARD_APP(httapi_function) if (!zstr(data)) { switch_event_create_brackets((char *)data, '{', '}', ',', ¶ms, &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_"))) {