mirror of
https://github.com/signalwire/freeswitch.git
synced 2026-11-16 14:28:34 +00:00
fix MDXMLINT-31
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@9216 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
1 parent
509562b401
commit
d8816f7d73
2 files changed
+50
-15
No files matched your search
@@ -570,6 +570,7 @@ SWITCH_STANDARD_API(status_function)
|
||||
switch_core_time_duration_t duration = { 0 };
|
||||
char *http = NULL;
|
||||
int sps = 0, last_sps = 0;
|
||||
const char *var;
|
||||
|
||||
if (session) {
|
||||
return SWITCH_STATUS_FALSE;
|
||||
@@ -581,6 +582,14 @@ SWITCH_STANDARD_API(status_function)
|
||||
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;
|
||||
}
|
||||
} else {
|
||||
stream->write_function(stream, "%s", "Content-Type: text/html\n\n");
|
||||
}
|
||||
|
||||
if (http || (cmd && strstr(cmd, "html"))) {
|
||||
html = 1;
|
||||
stream->write_function(stream, "<h1>FreeSWITCH Status</h1>\n<b>");
|
||||
@@ -2008,7 +2017,17 @@ SWITCH_STANDARD_API(show_function)
|
||||
}
|
||||
|
||||
if (stream->param_event) {
|
||||
const char *var;
|
||||
holder.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")) {
|
||||
holder.http = NULL;
|
||||
}
|
||||
} else {
|
||||
stream->write_function(stream, "%s", "Content-Type: text/html\n\n");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
holder.print_title = 1;
|
||||
|
||||
Reference in new issue
Block a user