fix(wcth): emit empty Addrs when input URL contains addr (#545)
Matches the behavior that the legacy TH implements in this situation and reduces slightly the differences. See https://github.com/ooni/probe/issues/1707#issuecomment-944143329
This commit is contained in:
parent
730b00ff73
commit
2d1666b88b
|
@ -76,7 +76,12 @@ func Measure(ctx context.Context, config MeasureConfig, creq *CtrlRequest) (*Ctr
|
|||
select {
|
||||
case cresp.DNS = <-dnsch:
|
||||
default:
|
||||
// we land here when there's no domain name
|
||||
// we need to emit a non-nil Addrs to match exactly
|
||||
// the behavior of the legacy TH
|
||||
cresp.DNS = CtrlDNSResult{
|
||||
Failure: nil,
|
||||
Addrs: []string{},
|
||||
}
|
||||
}
|
||||
cresp.HTTPRequest = <-httpch
|
||||
cresp.TCPConnect = make(map[string]CtrlTCPResult)
|
||||
|
|
Loading…
Reference in New Issue
Block a user