From 7765de44fc4abdcfbb9ce5f5cc17acb2c6808c9c Mon Sep 17 00:00:00 2001 From: aler9 <46489434+aler9@users.noreply.github.com> Date: Sat, 14 Aug 2021 11:07:49 +0200 Subject: [PATCH] api: log right protocol version of responses --- internal/core/api.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/core/api.go b/internal/core/api.go index cfe7c820..9d5ea0c7 100644 --- a/internal/core/api.go +++ b/internal/core/api.go @@ -337,7 +337,7 @@ func (a *api) mwLog(ctx *gin.Context) { ctx.Writer.Header().Set("Server", "rtsp-simple-server") var buf bytes.Buffer - fmt.Fprintf(&buf, "HTTP/1.1 %d %s\n", ctx.Writer.Status(), http.StatusText(ctx.Writer.Status())) + fmt.Fprintf(&buf, "%s %d %s\n", ctx.Request.Proto, ctx.Writer.Status(), http.StatusText(ctx.Writer.Status())) ctx.Writer.Header().Write(&buf) buf.Write([]byte("\n")) buf.Write(blw.buf.Bytes())