diff --git a/bytesconv.go b/bytesconv.go index 81f8e5b167..d54e77f933 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 4cbe9f3832..fb6f0054d0 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...)