优先判断文件然后再判断http-flv

This commit is contained in:
xiongziliang 2019-10-27 09:15:29 +08:00
parent 4ae66f0672
commit 7c16f37d64

View File

@ -503,11 +503,6 @@ void HttpSession::Handle_Req_GET(int64_t &content_len) {
return;
}
//再看看是否为http-flv直播请求
if(checkLiveFlvStream()){
//若是return
return;
}
//事件未被拦截则认为是http下载请求
auto fullUrl = string(HTTP_SCHEMA) + "://" + _parser["Host"] + _parser.FullUrl();
@ -557,6 +552,11 @@ void HttpSession::Handle_Req_GET(int64_t &content_len) {
//访问的是文件
struct stat tFileStat;
if (0 != stat(strFile.data(), &tFileStat)) {
//再看看是否为http-flv直播请求
if(checkLiveFlvStream()){
//若是return
return;
}
//文件不存在
sendNotFound(bClose);
throw SockException(bClose ? Err_shutdown : Err_success,"close connection after send 404 not found on file");