http客户端支持302跳转

修复HttpRequestSplitter可能内存越界的bug
This commit is contained in:
xiongziliang
2019-07-01 09:53:58 +08:00
parent 7aa0c2ae33
commit 67f7c3dc8f
3 changed files with 18 additions and 8 deletions

View File

@@ -198,7 +198,7 @@ void RtspPlayer::handleResDESCRIBE(const Parser& parser) {
sendDescribe();
return;
}
if(parser.Url() == "302"){
if(parser.Url() == "302" || parser.Url() == "301"){
auto newUrl = parser["Location"];
if(newUrl.empty()){
throw std::runtime_error("未找到Location字段(跳转url)");