Closed
Description
The Header.Clone
method is being added in Go1.13. It's current behavior is to always allocate a map and return it even if the receiver is nil.
Thus:
h1 := http.Header(nil)
h2 := h1.Clone()
fmt.Println(h1 == nil) // true
fmt.Println(h2 == nil) // false
Is this behavior we want to go with? It seems more consistent for Clone
to return nil if the receiver is also nil.