Update HttpSession.cpp
调整Cache-Control:no-cache的控制范围仅对ws-flv部分生效
This commit is contained in:
parent
0dc95cb85b
commit
3d2fd42f29
|
|
@ -148,9 +148,15 @@ bool HttpSession::checkWebSocket(){
|
||||||
_live_over_websocket = true;
|
_live_over_websocket = true;
|
||||||
sendResponse(101, false, nullptr, headerOut, nullptr, true);
|
sendResponse(101, false, nullptr, headerOut, nullptr, true);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
auto res_cb_flv = [this, header = std::move(headerOut)]() mutable {
|
||||||
|
_live_over_websocket = true;
|
||||||
|
header.emplace("Cache-Control", "no-store");
|
||||||
|
sendResponse(101, false, nullptr, header, nullptr, true);
|
||||||
|
};
|
||||||
|
|
||||||
//判断是否为websocket-flv
|
//判断是否为websocket-flv
|
||||||
if (checkLiveStreamFlv(res_cb)) {
|
if (checkLiveStreamFlv(res_cb_flv)) {
|
||||||
//这里是websocket-flv直播请求
|
//这里是websocket-flv直播请求
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue