]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
if string outside of {} contains :// consider that input to mean the url such as...
authorAnthony Minessale <anthm@freeswitch.org>
Tue, 17 Jan 2012 22:44:48 +0000 (16:44 -0600)
committerAnthony Minessale <anthm@freeswitch.org>
Tue, 17 Jan 2012 22:44:48 +0000 (16:44 -0600)
src/mod/applications/mod_httapi/mod_httapi.c

index d101c7d3bb9f5a9d200f8e271ffdb2d32d88ea90..abcf43047311f737bd613a15eb0e5c70f62e439b 100644 (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_"))) {