diff --git a/htp.go b/htp.go index e2e2c73..6f39b5d 100644 --- a/htp.go +++ b/htp.go @@ -18,11 +18,13 @@ const ( ) func main() { - host := flag.String("u", "https://www.google.com", "Host URL") + host := flag.String("u", "https://google.com", "Host URL") count := flag.Uint("n", 8, "Number of requests") quiet := flag.Bool("q", false, "Do not output time offset") flag.Parse() + http.DefaultClient.CheckRedirect = noRedirect + var ( offset int64 lo int64 = math.MinInt64 @@ -81,3 +83,7 @@ func max(a, b int64) int64 { } return b } + +func noRedirect(req *http.Request, via []*http.Request) error { + return http.ErrUseLastResponse +}