From 6006c8761d419a513555b809cab3d2bbdddf7562 Mon Sep 17 00:00:00 2001 From: tyltr Date: Sat, 30 Oct 2021 21:58:20 +0800 Subject: [PATCH] chore (#1137) --- bytesconv.go | 2 +- header.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/bytesconv.go b/bytesconv.go index 81f8e5b..d54e77f 100644 --- a/bytesconv.go +++ b/bytesconv.go @@ -380,7 +380,7 @@ func appendQuotedPath(dst, src []byte) []byte { for _, c := range src { if quotedPathShouldEscapeTable[int(c)] != 0 { - dst = append(dst, '%', upperhex[c>>4], upperhex[c&15]) + dst = append(dst, '%', upperhex[c>>4], upperhex[c&0xf]) } else { dst = append(dst, c) } diff --git a/header.go b/header.go index 4cbe9f3..fb6f005 100644 --- a/header.go +++ b/header.go @@ -746,7 +746,7 @@ func (h *ResponseHeader) CopyTo(dst *ResponseHeader) { dst.noDefaultDate = h.noDefaultDate dst.statusCode = h.statusCode - dst.statusLine = append(dst.statusLine[:0], h.statusLine...) + dst.statusLine = append(dst.statusLine, h.statusLine...) dst.contentLength = h.contentLength dst.contentLengthBytes = append(dst.contentLengthBytes, h.contentLengthBytes...) dst.contentType = append(dst.contentType, h.contentType...)