mirror of
https://github.com/ZLMediaKit/ZLMediaKit.git
synced 2024-11-22 19:00:01 +08:00
Merge pull request #933 from CharleyWangHZ/master
This commit is contained in:
commit
4609716ba3
@ -38,6 +38,12 @@ void HttpSession::Handle_Req_HEAD(ssize_t &content_len){
|
|||||||
sendResponse(200, true);
|
sendResponse(200, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void HttpSession::Handle_Req_OPTIONS(ssize_t &content_len)
|
||||||
|
{
|
||||||
|
//暂时对OPTINS进行200 OK回复
|
||||||
|
sendResponse(200, true);
|
||||||
|
}
|
||||||
|
|
||||||
ssize_t HttpSession::onRecvHeader(const char *header,size_t len) {
|
ssize_t HttpSession::onRecvHeader(const char *header,size_t len) {
|
||||||
typedef void (HttpSession::*HttpCMDHandle)(ssize_t &);
|
typedef void (HttpSession::*HttpCMDHandle)(ssize_t &);
|
||||||
static unordered_map<string, HttpCMDHandle> s_func_map;
|
static unordered_map<string, HttpCMDHandle> s_func_map;
|
||||||
@ -45,6 +51,7 @@ ssize_t HttpSession::onRecvHeader(const char *header,size_t len) {
|
|||||||
s_func_map.emplace("GET",&HttpSession::Handle_Req_GET);
|
s_func_map.emplace("GET",&HttpSession::Handle_Req_GET);
|
||||||
s_func_map.emplace("POST",&HttpSession::Handle_Req_POST);
|
s_func_map.emplace("POST",&HttpSession::Handle_Req_POST);
|
||||||
s_func_map.emplace("HEAD",&HttpSession::Handle_Req_HEAD);
|
s_func_map.emplace("HEAD",&HttpSession::Handle_Req_HEAD);
|
||||||
|
s_func_map.emplace("OPTIONS",&HttpSession::Handle_Req_OPTIONS);
|
||||||
}, nullptr);
|
}, nullptr);
|
||||||
|
|
||||||
_parser.Parse(header);
|
_parser.Parse(header);
|
||||||
|
@ -105,6 +105,7 @@ private:
|
|||||||
void Handle_Req_GET_l(ssize_t &content_len, bool sendBody);
|
void Handle_Req_GET_l(ssize_t &content_len, bool sendBody);
|
||||||
void Handle_Req_POST(ssize_t &content_len);
|
void Handle_Req_POST(ssize_t &content_len);
|
||||||
void Handle_Req_HEAD(ssize_t &content_len);
|
void Handle_Req_HEAD(ssize_t &content_len);
|
||||||
|
void Handle_Req_OPTIONS(ssize_t &content_len);
|
||||||
|
|
||||||
bool checkLiveStream(const string &schema, const string &url_suffix, const function<void(const MediaSource::Ptr &src)> &cb);
|
bool checkLiveStream(const string &schema, const string &url_suffix, const function<void(const MediaSource::Ptr &src)> &cb);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user