Uploaded image for project: 'C++ Driver'
  1. C++ Driver
  2. CXX-446

ConnectionString doesn't work with UNIX socket format

      mongodb:///tmp/mongodb-27017.sock

      This should be a valid string, instead an assert is fired in the constructor of the ConnectionString here:

      ConnectionString( ConnectionType type,
                                const std::string& user,
                                const std::string& password,
                                const std::string& servers,
                                const std::string& database,
                                const std::string& setName,
                                const BSONObj& options )
                  : _type( type )
                  , _servers( )
                  , _setName( setName )
                  , _user( user )
                  , _password( password )
                  , _database( database )
                  , _options( options ) {
      
                  _fillServers( servers );
                  switch ( _type ) {
                  case MASTER:
                      verify( _servers.size() == 1 );
                      break;
                  case SET:
                      verify( _setName.size() ); // ->HERE
                      verify( _servers.size() >= 1 ); // 1 is ok since we can derive
                      break;
                  case PAIR:
                      verify( _servers.size() == 2 );
                      break;
                  default:
                      verify( _servers.size() > 0 );
                  }
      
                  _finishInit();
      

            Assignee:
            tyler@10gen.com Tyler Brock
            Reporter:
            pieterwjordaanpc@gmail.com Pieter Jordaan
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: