// Determine whether to hang up after sending a request and body, or
// receiving a response and body
// 'header' is the request headers
Determine whether to hang up after sending a request and body, or
receiving a response and body
'header' is the request headers
// Determine whether to hang up after sending a request and body or // receiving a response and body // ' header ' is the request headers
func shouldClose(major, minor int, header http.Header, removeCloseHeader bool) bool {
	if major < 1 {
		return true
	}
	conv := header["Connection"]
	hasClose := httpguts.HeaderValuesContainsToken(conv, "close")
	if major == 1 && minor == 0 {
		return hasClose || !httpguts.HeaderValuesContainsToken(conv, "keep-alive")
	}
	if hasClose && removeCloseHeader {
		header.Del("Connection")
	}
	return hasClose
}
func shouldClose ( major , minor int , header http . Header , removeCloseHeader bool ) bool { if major < 1 { return true } conv := header [ " " ] hasClose := httpguts . HeaderValuesContainsToken ( conv , " " ) if major == 1 && minor == 0 { return hasClose || ! httpguts . HeaderValuesContainsToken ( conv , " " ) } if hasClose && removeCloseHeader { header . Del ( " " ) } return hasClose }
Determine whether to hang up after sending a request and body, or
receiving a response and body
'header' is the request headers
Determine whether to hang up after sending a request and body or receiving a response and body ' header ' is the request headers