Fixed bug "too many colons in address".
All checks were successful
build / build (push) Successful in 1m25s

This commit is contained in:
Алексей Бадяев 2024-11-04 15:13:12 +07:00
parent 13a9bd1aa1
commit ffbd6b14fa
Signed by: alexey
GPG Key ID: 686FBC1363E4AFAE

View File

@ -144,9 +144,11 @@ func (s *Server) handleConnection(ctx context.Context, conn net.Conn) {
if err != nil {
fields[log.FnError] = err.Error()
_ = s.logger.Warn("peekHTTP failed", fields)
} else {
if err == nil && host != "" {
} else if host != "" {
if !strings.Contains(host, ":") {
addr = host + addr[strings.Index(addr, ":"):]
} else {
addr = host
}
}
reader = reader_n3