From: Michael Jerris Date: Thu, 11 Dec 2008 17:56:51 +0000 (+0000) Subject: mod_commands only send content-type on status when it really is http. X-Git-Tag: v1.0.2~279 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ac8daf49c424af73cfbf668df8049a9a193af8af;p=thirdparty%2Ffreeswitch.git mod_commands only send content-type on status when it really is http. git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@10714 d0543943-73ff-0310-b7d9-9358b9ac24b2 --- diff --git a/src/mod/applications/mod_commands/mod_commands.c b/src/mod/applications/mod_commands/mod_commands.c index af39e97958..cb315a1409 100644 --- a/src/mod/applications/mod_commands/mod_commands.c +++ b/src/mod/applications/mod_commands/mod_commands.c @@ -704,13 +704,14 @@ SWITCH_STANDARD_API(status_function) if (stream->param_event) { http = switch_event_get_header(stream->param_event, "http-host"); + if ((var = switch_event_get_header(stream->param_event, "content-type"))) { + if (!strcasecmp(var, "text/plain")) { + http = NULL; + } + } } - if ((var = switch_event_get_header(stream->param_event, "content-type"))) { - if (!strcasecmp(var, "text/plain")) { - http = NULL; - } - } else { + if (http) { stream->write_function(stream, "%s", "Content-Type: text/html\n\n"); }