Actions
Feature #3968
closedhttps should work for rest-bench
% Done:
0%
Source:
Tags:
Backport:
Reviewed:
Affected Versions:
Pull request ID:
Description
Trying to set the protocol to https by using the --protocol=https flag does not work.
$ rest-bench --api-host=hostname --protocol=https --bucket=bench --access-key=$S3_ACCESS_KEY_ID --secret=$S3_SECRET_ACCESS_KEY --show-time --seconds 120 write host=hostname bad protocol usage: rest-bench [options] <write|seq> rest-bench [options] cleanup <prefix>
Looking at the source, the reason is clear:
rest_bench.cc lines 702-710:
} else if (ceph_argparse_witharg(args, i, &proto_str, "--protocol", (char*)NULL)) { if (strcasecmp(proto_str.c_str(), "http") == 0) { protocol = S3ProtocolHTTP; } else if (strcasecmp(proto_str.c_str(), "http") == 0) { protocol = S3ProtocolHTTPS; } else { cerr << "bad protocol" << std::endl; usage_exit(); }
The second if block on line 705 compares to "http" again instead of "https".
Actions