mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-04-17 01:02:12 +00:00
Merge pull request #658 in FS/freeswitch from xml_rpc_segfault_fix to master
* commit '23e333a9fc3dad4b227659f2a31fb65321970f1e': FS-8706: Fix a segfault where no response status was set previously, and try to prevent future ones by setting default response status of 500.
This commit is contained in:
commit
e2718b1111
@ -534,6 +534,7 @@ static abyss_bool http_directory_auth(TSession *r, char *domain_name)
|
|||||||
|
|
||||||
ResponseAddField(r, "freeswitch-user", (box ? box : user));
|
ResponseAddField(r, "freeswitch-user", (box ? box : user));
|
||||||
ResponseAddField(r, "freeswitch-domain", domain_name);
|
ResponseAddField(r, "freeswitch-domain", domain_name);
|
||||||
|
ResponseStatus(r, 200);
|
||||||
rval = TRUE;
|
rval = TRUE;
|
||||||
goto done;
|
goto done;
|
||||||
}
|
}
|
||||||
@ -707,6 +708,11 @@ abyss_bool auth_hook(TSession * r)
|
|||||||
char *domain_name, *e;
|
char *domain_name, *e;
|
||||||
abyss_bool ret = FALSE;
|
abyss_bool ret = FALSE;
|
||||||
|
|
||||||
|
/* Default to 500 status to avoid assert. It should be
|
||||||
|
overridden later if we actually handle it or if the
|
||||||
|
default handler in abyss handles it. */
|
||||||
|
ResponseStatus(r, 500);
|
||||||
|
|
||||||
if (globals.enable_websocket && !strncmp(r->requestInfo.uri, "/socket", 7)) {
|
if (globals.enable_websocket && !strncmp(r->requestInfo.uri, "/socket", 7)) {
|
||||||
// Chrome has no Authorization support yet
|
// Chrome has no Authorization support yet
|
||||||
// https://code.google.com/p/chromium/issues/detail?id=123862
|
// https://code.google.com/p/chromium/issues/detail?id=123862
|
||||||
@ -827,6 +833,11 @@ abyss_bool handler_hook(TSession * r)
|
|||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Default to 500 status to avoid assert. It should be
|
||||||
|
overridden later if we actually handle it or if the
|
||||||
|
default handler in abyss handles it. */
|
||||||
|
ResponseStatus(r, 500);
|
||||||
|
|
||||||
stream.data = r;
|
stream.data = r;
|
||||||
stream.write_function = http_stream_write;
|
stream.write_function = http_stream_write;
|
||||||
stream.raw_write_function = http_stream_raw_write;
|
stream.raw_write_function = http_stream_raw_write;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user