Skip to content

Commit

Permalink
Merge pull request #314 from cuteLittleDevil/patch-1
Browse files Browse the repository at this point in the history
[fix] 修复火狐浏览器播放ws-flv失败的问题
  • Loading branch information
q191201771 authored Aug 31, 2023
2 parents 6af11b2 + 2263c7f commit 6915b75
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pkg/logic/http_server_handler.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,8 @@ func (h *HttpServerHandler) ServeSubSession(writer http.ResponseWriter, req *htt
isWebSocket bool
webSocketKey string
)
if req.Header.Get("Connection") == "Upgrade" && req.Header.Get("Upgrade") == "websocket" {
// 火狐浏览器 Connection = [keep-alive, Upgrade]
if strings.Contains(req.Header.Get("Connection"), "Upgrade") && req.Header.Get("Upgrade") == "websocket" {
isWebSocket = true
webSocketKey = req.Header.Get("Sec-WebSocket-Key")
}
Expand Down

0 comments on commit 6915b75

Please sign in to comment.