+ if (sptr->cfAuth.length())
+ {
+ b->set_option("user", sptr->cfAuth.c_str());
+ if (authentication.length())
+ {
+ size_t found = authentication.find('/');
+ if (found != std::string::npos)
+ {
+ cf_parm += "user=" + uri_encode(authentication.substr(0, found))
+ + "&password=" + uri_encode(authentication.substr(found+1));
+ }
+ else
+ cf_parm += "user=" + uri_encode(authentication);
+ }
+ }
+ else if (authentication.length())
+ b->set_option("user", authentication.c_str());
+
+ if (sptr->cfProxy.length())
+ {
+ if (cf_parm.length())
+ cf_parm += "&";
+ cf_parm += "proxy=" + uri_encode(sptr->cfProxy);
+ }
+ if (sptr->cfSubDb.length())
+ {
+ if (cf_parm.length())
+ cf_parm += "&";
+ cf_parm += "subdatabase=" + uri_encode(sptr->cfSubDb);
+ }
+