Feature #3968
https 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".
Associated revisions
Fix rest_bench to support https
Fixes: #3968
There's typo in the code which has compared 'http' twice
Signed-off-by: Yuan Zhou <yuan.zhou@intel.com>
History
#1 Updated by Ian Colle almost 11 years ago
- Tracker changed from Bug to Feature
- Subject changed from https does not work for rest-bench to https should work for rest-bench
- Assignee set to Yehuda Sadeh
#2 Updated by Kefu Chai over 8 years ago
- Status changed from New to Fix Under Review
#3 Updated by Kefu Chai over 8 years ago
- Status changed from Fix Under Review to Resolved