修复http代理的两个问题,原http代理功能提交(#2988):d593267 (#4219)

1. CONNECT请求添加Host字段, 解决400 bad request问题;
    2. HLS拉取第2个ts分片时,重新设置http代理,解决第2个分片及后续分片未走代理的问题。
This commit is contained in:
Wayne Chen
2025-04-10 15:09:46 +08:00
committed by GitHub
parent 8ff1459789
commit dfca520857
2 changed files with 16 additions and 3 deletions

View File

@@ -133,6 +133,10 @@ void HlsPlayer::fetchSegment() {
if (!(*this)[Client::kNetAdapter].empty()) {
_http_ts_player->setNetAdapter((*this)[Client::kNetAdapter]);
}
} else {
// 每次请求新的ts片段时重置HttpTSPlayer状态
_http_ts_player->clear();
_http_ts_player->setProxyUrl((*this)[Client::kProxyUrl]);
}
Ticker ticker;