diff --git a/README.md b/README.md index 875f60af..ce92be20 100644 --- a/README.md +++ b/README.md @@ -194,7 +194,7 @@ Options: --disable-compression Disable compression. -r, --redirect - Limit for number of Redirect. Set 0 for no redirection. Redirection isn't supported for HTTP/2. [default: 10] + Limit for number of Redirect. Set 0 for no redirection. Redirection isn't supported for HTTP/2. [default: 0] --disable-keepalive Disable keep-alive, prevents re-use of TCP connections between different HTTP requests. This isn't supported for HTTP/2. --no-pre-lookup diff --git a/src/lib.rs b/src/lib.rs index db144066..4bdf0621 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -233,7 +233,7 @@ Note: If qps is specified, burst will be ignored", disable_compression: bool, #[arg( help = "Limit for number of Redirect. Set 0 for no redirection. Redirection isn't supported for HTTP/2.", - default_value = "10", + default_value = "0", short = 'r', long = "redirect" )] diff --git a/tests/tests.rs b/tests/tests.rs index cf4c50ee..77634921 100644 --- a/tests/tests.rs +++ b/tests/tests.rs @@ -352,6 +352,8 @@ async fn get_host_with_connect_to_redirect(host: &'static str) -> String { let args = [ "-n".to_string(), "1".to_string(), + "-r".to_string(), + "10".to_string(), format!("http://{host}/source"), "--connect-to".to_string(), format!("{host}:80:localhost:{port}"),