diff --git a/lib/netext/httpext/request.go b/lib/netext/httpext/request.go index 9205ec6a49d..86af6a08aff 100644 --- a/lib/netext/httpext/request.go +++ b/lib/netext/httpext/request.go @@ -270,8 +270,8 @@ func MakeRequest(ctx context.Context, preq *ParsedHTTPRequest) (*Response, error } if preq.Auth == "digest" { - // In both digest and NTLM it is expected that the first response will be 401 - // this does mean that a non 401 response will be marked as failed/unexpected + // Until digest authentication is refactored, the first response will always + // be a 401 error, so we expect that. if tracerTransport.responseCallback != nil { originalResponseCallback := tracerTransport.responseCallback tracerTransport.responseCallback = func(status int) bool { @@ -281,6 +281,7 @@ func MakeRequest(ctx context.Context, preq *ParsedHTTPRequest) (*Response, error } transport = digestTransport{originalTransport: transport} } else if preq.Auth == "ntlm" { + // The first response of NTLM auth may be a 401 error. if tracerTransport.responseCallback != nil { originalResponseCallback := tracerTransport.responseCallback tracerTransport.responseCallback = func(status int) bool { diff --git a/stats/units.go b/stats/units.go index 9e5997f2bd7..e414f8d20d7 100644 --- a/stats/units.go +++ b/stats/units.go @@ -38,7 +38,7 @@ func ToD(d float64) time.Duration { return time.Duration(d * float64(timeUnit)) } -// B formats a boolena for emission +// B formats a boolean value for emission. func B(b bool) float64 { if b { return 1