TUN-2820: Serialized headers for Websockets

This commit is contained in:
Areg Harutyunyan 2020-03-19 01:39:59 +00:00
parent d03469b6d3
commit 96f11de7ab
1 changed files with 2 additions and 1 deletions

View File

@ -103,7 +103,8 @@ func ParseUserHeaders(headerNameToParseFrom string, headers []Header) ([]Header,
func IsControlHeader(headerName string) bool {
headerName = strings.ToLower(headerName)
return strings.ToLower(headerName) == "content-length" ||
return headerName == "content-length" ||
headerName == "connection" || headerName == "upgrade" || // Websocket headers
strings.HasPrefix(headerName, ":") ||
strings.HasPrefix(headerName, "cf-")
}