1
0
Fork 0
mirror of https://github.com/ossrs/srs.git synced 2025-03-09 15:49:59 +00:00

fix #442, support kickoff client.

This commit is contained in:
winlin 2015-08-22 13:36:15 +08:00
parent b37797b13a
commit 94641c812b
11 changed files with 57 additions and 46 deletions

View file

@ -120,8 +120,11 @@ string srs_go_http_detect(char* data, int size)
return "application/octet-stream"; // fallback
}
// Error replies to the request with the specified error message and HTTP code.
// The error message should be plain text.
int srs_go_http_error(ISrsHttpResponseWriter* w, int code)
{
return srs_go_http_error(w, code, srs_generate_http_status_text(code));
}
int srs_go_http_error(ISrsHttpResponseWriter* w, int code, string error)
{
int ret = ERROR_SUCCESS;
@ -287,7 +290,7 @@ bool SrsHttpNotFoundHandler::is_not_found()
int SrsHttpNotFoundHandler::serve_http(ISrsHttpResponseWriter* w, ISrsHttpMessage* r)
{
return srs_go_http_error(w, SRS_CONSTS_HTTP_NotFound, SRS_CONSTS_HTTP_NotFound_str);
return srs_go_http_error(w, SRS_CONSTS_HTTP_NotFound);
}
SrsHttpFileServer::SrsHttpFileServer(string root_dir)