fix invalid HTTP header values when hijacking a connection

Signed-off-by: Denys Knertser <denys@avassa.io>
This commit is contained in:
Denys Knertser
2024-03-07 14:52:27 +01:00
parent 54fac875e5
commit 2ff5716b7e
3 changed files with 10 additions and 1 deletions

View File

@ -217,7 +217,7 @@ func writeHijackHeader(r *http.Request, conn io.Writer, tty bool) {
// Upgraded
fmt.Fprintf(conn,
"HTTP/1.1 101 UPGRADED\r\nContent-Type: %s\r\nConnection: Upgrade\r\nUpgrade: %s\r\n\r\n",
proto, header)
header, proto)
}
}