From 0034cbb30357bc75e84787b2e9df3f51ec642702 Mon Sep 17 00:00:00 2001 From: dexter <178529795@qq.com> Date: Mon, 3 Oct 2022 18:39:17 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20FIX:=20=E5=A2=9E=E5=AF=B9?= =?UTF-8?q?=E8=B7=AF=E5=BE=84=E4=BC=A0=E5=8F=82=E7=9A=84=E6=94=AF=E6=8C=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- main.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/main.go b/main.go index 1481f3a..c53b18c 100644 --- a/main.go +++ b/main.go @@ -120,6 +120,9 @@ func (sub *HDLSubscriber) OnEvent(event any) { func (*HDLConfig) ServeHTTP(w http.ResponseWriter, r *http.Request) { streamPath := strings.TrimSuffix(strings.TrimPrefix(r.URL.Path, "/hdl/"), ".flv") + if r.URL.RawQuery != "" { + streamPath += "?" + r.URL.RawQuery + } w.Header().Set("Transfer-Encoding", "chunked") w.Header().Set("Content-Type", "video/x-flv") sub := &HDLSubscriber{}