[Freeswitch-svn] [commit] r10714 - freeswitch/trunk/src/mod/applications/mod_commands
FreeSWITCH SVN
mikej at freeswitch.org
Thu Dec 11 09:56:51 PST 2008
Author: mikej
Date: Thu Dec 11 12:56:51 2008
New Revision: 10714
Log:
mod_commands only send content-type on status when it really is http.
Modified:
freeswitch/trunk/src/mod/applications/mod_commands/mod_commands.c
Modified: freeswitch/trunk/src/mod/applications/mod_commands/mod_commands.c
==============================================================================
--- freeswitch/trunk/src/mod/applications/mod_commands/mod_commands.c (original)
+++ freeswitch/trunk/src/mod/applications/mod_commands/mod_commands.c Thu Dec 11 12:56:51 2008
@@ -704,13 +704,14 @@
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");
}
More information about the Freeswitch-svn
mailing list