// AddIgnoreHeaderExist ignore etag if header exist
778465
func (t *ETagConfig) AddIgnoreHeaderExist(header string, exist bool) *ETagConfig {
	t.IgnoreIfHeaderExist[header] = exist
	return t
}
1116241
func addIndentHeaderComment(b *bytes.Buffer, format string, args ...interface{}) {
	if b.Len() > 0 {
		fmt.Fprintf(b, "\n// "+format+"\n", args...)
	} else {
		fmt.Fprintf(b, "// "+format+"\n", args...)
	}
}
570300
func (r *Registry) AddExternalHTTPRule(qualifiedMethodName string, rule *annotations.HttpRule) {
	r.externalHTTPRules[qualifiedMethodName] = append(r.externalHTTPRules[qualifiedMethodName], rule)
}
958937
func (o CopyOptions) addHeaders(headers http.Header) {
	if len(o.ServerSideEncryptionKeyID) != 0 {
		headers.Set("x-oss-server-side-encryption", "KMS")
		headers.Set("x-oss-server-side-encryption-key-id", o.ServerSideEncryptionKeyID)
	} else if o.ServerSideEncryption {
		headers.Set("x-oss-server-side-encryption", "AES256")
	}

	if len(o.MetadataDirective) != 0 {
		headers.Set("x-oss-metadata-directive", o.MetadataDirective)
	}
	if len(o.CopySourceOptions) != 0 {
		headers.Set("x-oss-copy-source-range", o.CopySourceOptions)
	}
	if o.Headers != nil {
		for k, v := range o.Headers {
			newSlice := make([]string, len(v))
			copy(newSlice, v)
			headers[k] = newSlice
		}
	}
}
919913
func (b *BindataAssets) addCacheHeaders(filename string, w http.ResponseWriter) error {
	w.Header().Add("Cache-Control", "public, max-age=3600")
	fi, err := AssetInfo(filename)
	if err != nil {
		return err
	}

	hour, minute, second := fi.ModTime().Clock()
	etag := fmt.Sprintf(`"%d%d%d%d%d"`, fi.Size(), fi.ModTime().Day(), hour, minute, second)

	w.Header().Set("ETag", etag)
	return nil
}
566417
func AddCustomGlobalFlags(fs *pflag.FlagSet) {
	// Lookup flags in global flag set and re-register the values with our flagset.

	// Adds flags from k8s.io/kubernetes/pkg/cloudprovider/providers.
	globalflag.Register(fs, "cloud-provider-gce-lb-src-cidrs")

	// Adds flags from k8s.io/apiserver/pkg/admission.
	globalflag.Register(fs, "default-not-ready-toleration-seconds")
	globalflag.Register(fs, "default-unreachable-toleration-seconds")
}
582902
func (h Headers) Add(k, v string) Headers {
	r := append(h, k, v)
	return r
}
785063
func (w *gzipResponseWriter) WriteHeader(code int) {
	w.Header().Del("Content-Length")
	w.Header().Set("Content-Encoding", "gzip")
	w.Header().Add("Vary", "Accept-Encoding")
	originalEtag := w.Header().Get("ETag")
	if originalEtag != "" && !strings.HasPrefix(originalEtag, "W/") {
		w.Header().Set("ETag", "W/"+originalEtag)
	}
	w.ResponseWriterWrapper.WriteHeader(code)
	w.statusCodeWritten = true
}
374690
func (s *Scheme) AddIgnoredConversionType(from, to interface{}) error {
	return s.converter.RegisterIgnoredConversion(from, to)
}
508862
func (m *tokenManager) AddLoginRequiredHeaderToUnauthorizedError(err error, rw http.ResponseWriter) {
	if unth, _ := autherrors.IsUnauthorizedError(err); unth {
		m.AddLoginRequiredHeader(rw)
	}
}
965586
func (s *APIEnablementOptions) AddFlags(fs *pflag.FlagSet) {
	fs.Var(&s.RuntimeConfig, "runtime-config", ""+
		"A set of key=value pairs that describe runtime configuration that may be passed "+
		"to apiserver. <group>/<version> (or <version> for the core group) key can be used to "+
		"turn on/off specific api versions. api/all is special key to control all api versions, "+
		"be careful setting it false, unless you know what you do. api/legacy is deprecated, "+
		"we will remove it in the future, so stop using it.")
}
191401
func (bow *Browser) AddRequestHeader(name, value string) {
	bow.headers.Set(name, value)
}
572499
func (o Options) addHeaders(headers http.Header) {
	if len(o.ServerSideEncryptionKeyID) != 0 {
		headers.Set("x-oss-server-side-encryption", "KMS")
		headers.Set("x-oss-server-side-encryption-key-id", o.ServerSideEncryptionKeyID)
	} else if o.ServerSideEncryption {
		headers.Set("x-oss-server-side-encryption", "AES256")
	}
	if len(o.ContentEncoding) != 0 {
		headers.Set("Content-Encoding", o.ContentEncoding)
	}
	if len(o.CacheControl) != 0 {
		headers.Set("Cache-Control", o.CacheControl)
	}
	if len(o.ContentMD5) != 0 {
		headers.Set("Content-MD5", o.ContentMD5)
	}
	if len(o.ContentDisposition) != 0 {
		headers.Set("Content-Disposition", o.ContentDisposition)
	}

	for k, v := range o.Meta {
		for _, mv := range v {
			headers.Add("x-oss-meta-"+k, mv)
		}
	}
}
202386
func AddHeaders(headers map[string]string) http.HandlerFunc {
	return func(w http.ResponseWriter, r *http.Request) {
		h := w.Header()

		for name, value := range headers {
			h.Add(name, value)
		}
	}
}
1280774
func DefaultHeader(k, v string) Opt {
	return func(c *Client) Opt {
		old, found := c.header[k]
		old = append([]string{}, old...) // clone
		c.header.Add(k, v)
		return func(c *Client) Opt {
			if found {
				c.header[k] = old
			} else {
				c.header.Del(k)
			}
			return DefaultHeader(k, v)
		}
	}
}
155346
func addApplicationHeaders(md metadata.MD, headers transport.Headers) error {
	for header, value := range headers.Items() {
		header = transport.CanonicalizeHeaderKey(header)
		if isReserved(header) {
			return yarpcerrors.InvalidArgumentErrorf("cannot use reserved header in application headers: %s", header)
		}
		if err := addToMetadata(md, header, value); err != nil {
			return err
		}
	}
	return nil
}
193929
func (r Request) AddHeader(key string, value string) Request {
	r.Headers = append(r.Headers, Header{Key: key, Value: value})
	return r
}