// Set the extra headers' size.
490157
func (e *RawV4Event) SetExtraHeadersSize(size int) error {
	newFixedSize := (size +
		sizeOfBasicV4EventHeader +
		e.fixedLengthDataSize +
		e.checksumSize)
	if size < 0 || newFixedSize > len(e.data) {
		return errors.Newf(
			"Invalid extra headers size (data size: %d basic header size: %d"+
				"fixed length data size: %d checksum size: %d input: %d)",
			len(e.data),
			sizeOfBasicV4EventHeader,
			e.fixedLengthDataSize,
			e.checksumSize,
			size)
	}
	e.extraHeadersSize = size
	return nil
}
24662
func (c *Config) AddExposeHeaders(headers ...string) {
	c.ExposeHeaders = append(c.ExposeHeaders, headers...)
}
785799
func (p *Personalization) SetHeader(key string, value string) {
	p.Headers[key] = value
}
1176244
func (p *UNSUBSCRIBE) setFixedHeader() {
	// Append the first byte to the fixed header.
	p.fixedHeader = append(p.fixedHeader, TypeUNSUBSCRIBE<<4|0x02)

	// Append the Remaining Length to the fixed header.
	p.appendRemainingLength()
}
49020
func (rw *RequestHeader) Size() int32 {
	encoder := sizingEncoderPool.Get().(*SizingEncoder)
	rw.Write(encoder)
	size := encoder.Size()

	encoder.Reset()
	sizingEncoderPool.Put(encoder)

	return size
}
575146
func (p *PUBREC) setFixedHeader() {
	// Append the first byte to the fixed header.
	p.fixedHeader = append(p.fixedHeader, TypePUBREC<<4)

	// Append the Remaining Length to the fixed header.
	p.appendRemainingLength()
}
99603
func Header(headers map[string]string) RequestOption {
	return func(req *http.Request) (*http.Request, error) {
		for k, v := range headers {
			if strings.ToLower(k) == "content-length" {
				if len, err := strconv.Atoi(v); err == nil && req.ContentLength <= 0 {
					req.ContentLength = int64(len)
				}
			} else {
				req.Header.Set(k, v)
			}
		}

		return req, nil
	}
}
1149433
func (s *JobOutput) SetFileSize(v int64) *JobOutput {
	s.FileSize = &v
	return s
}
547412
func (p *SUBSCRIBE) setFixedHeader() {
	// Append the first byte to the fixed header.
	p.fixedHeader = append(p.fixedHeader, TypeSUBSCRIBE<<4|0x02)

	// Append the Remaining Length to the fixed header.
	p.appendRemainingLength()
}
832926
func (s *SourceTableDetails) SetTableSizeBytes(v int64) *SourceTableDetails {
	s.TableSizeBytes = &v
	return s
}
866066
func SetRequestHeader(key, val string) RequestFunc {
	return func(ctx context.Context, r *http.Request) context.Context {
		r.Header.Set(key, val)
		return ctx
	}
}
946793
func (s *Origin) SetCustomHeaders(v *CustomHeaders) *Origin {
	s.CustomHeaders = v
	return s
}
728710
func (ctx *Context) AddHeader(key, value string) {
	ctx.Response.Header().Add(key, value)
}
297955
func (h *Headers) set(reqHeader http.Header) {
	// headers are optional
	if h == nil {
		return
	}

	if h.ID != "" {
		reqHeader.Set("apns-id", h.ID)
	} // when omitted, Apple will generate a UUID for you

	if h.CollapseID != "" {
		reqHeader.Set("apns-collapse-id", h.CollapseID)
	}

	if !h.Expiration.IsZero() {
		reqHeader.Set("apns-expiration", strconv.FormatInt(h.Expiration.Unix(), 10))
	}

	if h.LowPriority {
		reqHeader.Set("apns-priority", "5")
	} // when omitted, the default priority is 10

	if h.Topic != "" {
		reqHeader.Set("apns-topic", h.Topic)
	}

}
890276
func (c HTTPHeadersCarrier) Set(key, val string) {
	h := http.Header(c)
	h.Set(key, val)
}
353476
func (t *TextTable) SetHeader(headers ...string) error {
	if len(headers) == 0 {
		return errors.New("no headers")
	}

	columnSize := len(headers)

	t.width = columnSize
	t.maxWidths = make([]int, columnSize)

	rows := stringsToTableRow(headers)
	t.updateColumnWidth(rows)

	t.header = rows

	return nil
}
508276
func (w *minifyResponseWriter) WriteHeader(status int) {
	w.ResponseWriter.Header().Del("Content-Length")
	w.ResponseWriter.WriteHeader(status)
}