forked from ms/transocks
Fixed bug "too many colons in address".
All checks were successful
build / build (push) Successful in 1m25s
All checks were successful
build / build (push) Successful in 1m25s
This commit is contained in:
parent
13a9bd1aa1
commit
ffbd6b14fa
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user