mirror of
https://github.com/valyala/fasthttp.git
synced 2026-06-14 15:56:44 +03:00
fix: add noDefaultContentType copy (#1538)
This commit is contained in:
@@ -1044,6 +1044,7 @@ func (h *RequestHeader) CopyTo(dst *RequestHeader) {
|
||||
dst.disableNormalizing = h.disableNormalizing
|
||||
dst.noHTTP11 = h.noHTTP11
|
||||
dst.connectionClose = h.connectionClose
|
||||
dst.noDefaultContentType = h.noDefaultContentType
|
||||
|
||||
dst.contentLength = h.contentLength
|
||||
dst.contentLengthBytes = append(dst.contentLengthBytes, h.contentLengthBytes...)
|
||||
|
||||
@@ -1342,6 +1342,7 @@ func TestRequestHeaderCopyTo(t *testing.T) {
|
||||
h.Set(HeaderHost, "aaaa")
|
||||
h.Set("aaaxxx", "123")
|
||||
h.Set(HeaderTrailer, "foo, bar")
|
||||
h.noDefaultContentType = true
|
||||
|
||||
var h1 RequestHeader
|
||||
h.CopyTo(&h1)
|
||||
|
||||
Reference in New Issue
Block a user