From d08921841a1439888edb1f52d72105e2d665da51 Mon Sep 17 00:00:00 2001
From: a <a@a.a>
Date: Thu, 13 Oct 2022 18:20:18 -0500
Subject: [PATCH] hotfix patch

---
 protocol.go | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/protocol.go b/protocol.go
index c971d77..bdf57e9 100644
--- a/protocol.go
+++ b/protocol.go
@@ -128,7 +128,11 @@ func NewReaderResponseWriterMsg(r *Request) *ResponseWriterMsg {
 }
 
 func (w *ResponseWriterMsg) Header() http.Header {
-	return w.r.Peer().HTTP.WriteHeaders
+	wh := w.r.Peer().HTTP.WriteHeaders
+	if wh == nil {
+		wh = make(http.Header)
+	}
+	return wh
 }
 
 func (w *ResponseWriterMsg) Option(k string, v any) {
-- 
GitLab