func (h *RequestHeader) ContentLength() int {
	if h.ignoreBody() {
		return 0
	}
	return h.realContentLength()
}
ContentLength returns Content-Length header value.

It may be negative:
-1 means Transfer-Encoding: chunked.
package fasthttp
import (
	"bufio"
	"bytes"
	"errors"
	"fmt"
	"io"
	"sync/atomic"
	"time"
)
type ResponseHeader struct {
	noCopy noCopy
	disableNormalizing   bool
	noHTTP11             bool
	connectionClose      bool
	noDefaultContentType bool
	statusCode         int
	contentLength      int
	contentLengthBytes []byte
	contentType []byte
	server      []byte
	h     []argsKV
	bufKV argsKV
	cookies []argsKV
}
type RequestHeader struct {
	noCopy noCopy
	disableNormalizing bool
	noHTTP11           bool
	connectionClose    bool
	cookiesCollected bool
	rawHeadersParsed bool
	contentLength      int
	contentLengthBytes []byte
	method      []byte
	requestURI  []byte
	host        []byte
	contentType []byte
	userAgent   []byte
	h     []argsKV
	bufKV argsKV
	cookies []argsKV
	rawHeaders []byte
	rawHeadersCopy []byte
}
func (h *ResponseHeader) SetContentRange(startPos, endPos, contentLength int) {
	b := h.bufKV.value[:0]
	b = append(b, strBytes...)
	b = append(b, ' ')
	b = AppendUint(b, startPos)
	b = append(b, '-')
	b = AppendUint(b, endPos)
	b = append(b, '/')
	b = AppendUint(b, contentLength)
	h.bufKV.value = b
	h.SetCanonical(strContentRange, h.bufKV.value)
}
func (h *RequestHeader) SetByteRange(startPos, endPos int) {
	h.parseRawHeaders()
	b := h.bufKV.value[:0]
	b = append(b, strBytes...)
	b = append(b, '=')
	if startPos >= 0 {
		b = AppendUint(b, startPos)
	} else {
		endPos = -startPos
	}
	b = append(b, '-')
	if endPos >= 0 {
		b = AppendUint(b, endPos)
	}
	h.bufKV.value = b
	h.SetCanonical(strRange, h.bufKV.value)
}
func (h *ResponseHeader) StatusCode() int {
	if h.statusCode == 0 {
		return StatusOK
	}
	return h.statusCode
}
func (h *ResponseHeader) SetStatusCode(statusCode int) {
	h.statusCode = statusCode
}
func (h *ResponseHeader) SetLastModified(t time.Time) {
	h.bufKV.value = AppendHTTPDate(h.bufKV.value[:0], t)
	h.SetCanonical(strLastModified, h.bufKV.value)
}
func (h *ResponseHeader) ConnectionClose() bool {
	return h.connectionClose
}
func (h *ResponseHeader) SetConnectionClose() {
	h.connectionClose = true
}
func (h *ResponseHeader) ResetConnectionClose() {
	if h.connectionClose {
		h.connectionClose = false
		h.h = delAllArgsBytes(h.h, strConnection)
	}
}
func (h *RequestHeader) ConnectionClose() bool {
	h.parseRawHeaders()
	return h.connectionClose
}
func (h *RequestHeader) SetConnectionClose() {
	h.connectionClose = true
}
func (h *RequestHeader) ResetConnectionClose() {
	h.parseRawHeaders()
	if h.connectionClose {
		h.connectionClose = false
		h.h = delAllArgsBytes(h.h, strConnection)
	}
}
func (h *ResponseHeader) ConnectionUpgrade() bool {
	return hasHeaderValue(h.Peek(HeaderConnection), strUpgrade)
}
func (h *RequestHeader) ConnectionUpgrade() bool {
	h.parseRawHeaders()
	return hasHeaderValue(h.Peek(HeaderConnection), strUpgrade)
}
func (h *ResponseHeader) PeekCookie(key string) []byte {
	return peekArgStr(h.cookies, key)
}
func (h *ResponseHeader) ContentLength() int {
	return h.contentLength
}
func (h *ResponseHeader) SetContentLength(contentLength int) {
	if h.mustSkipContentLength() {
		return
	}
	h.contentLength = contentLength
	if contentLength >= 0 {
		h.contentLengthBytes = AppendUint(h.contentLengthBytes[:0], contentLength)
		h.h = delAllArgsBytes(h.h, strTransferEncoding)
	} else {
		h.contentLengthBytes = h.contentLengthBytes[:0]
		value := strChunked
		if contentLength == -2 {
			h.SetConnectionClose()
			value = strIdentity
		}
		h.h = setArgBytes(h.h, strTransferEncoding, value, argsHasValue)
	}
}
func (h *ResponseHeader) mustSkipContentLength() bool {
	statusCode := h.StatusCode()
	if statusCode < 100 || statusCode == StatusOK {
		return false
	}
	return statusCode == StatusNotModified || statusCode == StatusNoContent || statusCode < 200
}