// Copyright 2019 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.

package http

import (
	
	
	
)

func ( url.Values) url.Values {
	if  == nil {
		return nil
	}
	// http.Header and url.Values have the same representation, so temporarily
	// treat it like http.Header, which does have a clone:
	return url.Values(Header().Clone())
}

func ( *url.URL) *url.URL {
	if  == nil {
		return nil
	}
	 := new(url.URL)
	* = *
	if .User != nil {
		.User = new(url.Userinfo)
		*.User = *.User
	}
	return 
}

func ( *multipart.Form) *multipart.Form {
	if  == nil {
		return nil
	}
	 := &multipart.Form{
		Value: (map[string][]string)(Header(.Value).Clone()),
	}
	if .File != nil {
		 := make(map[string][]*multipart.FileHeader)
		for ,  := range .File {
			 := make([]*multipart.FileHeader, len())
			for ,  := range  {
				[] = cloneMultipartFileHeader()
			}
			[] = 
		}
		.File = 
	}
	return 
}

func ( *multipart.FileHeader) *multipart.FileHeader {
	if  == nil {
		return nil
	}
	 := new(multipart.FileHeader)
	* = *
	.Header = textproto.MIMEHeader(Header(.Header).Clone())
	return 
}

// cloneOrMakeHeader invokes Header.Clone but if the
// result is nil, it'll instead make and return a non-nil Header.
func ( Header) Header {
	 := .Clone()
	if  == nil {
		 = make(Header)
	}
	return 
}