Warns about incorrect spacing near 'port' (e.g., 'port = 80').
Fixes issue #12038.
Signed-off-by: Matt Benjamin <mbenjamin@redhat.com>
(cherry picked from commit
93497e576a946ed7e59f4a4299e447b65aa1774b)
for (list<string>::iterator iter = frontends.begin(); iter != frontends.end(); ++iter) {
string& f = *iter;
+ if (f.find("civetweb") != string::npos) {
+ if (f.find("port") != string::npos) {
+ // check for the most common ws problems
+ if ((f.find("port=") == string::npos) ||
+ (f.find("port= ") != string::npos)) {
+ derr << "WARNING: civetweb frontend config found unexpected spacing around 'port' (ensure civetweb port parameter has the form 'port=80' with no spaces before or after '=')" << dendl;
+ }
+ }
+ }
+
RGWFrontendConfig *config = new RGWFrontendConfig(f);
int r = config->init();
if (r < 0) {