Fix failing tests for uri encoding auth

This uses a *slightly* patched version of node's uri module to allow
commas and colons in hostnames, which causes the parsed representation
of replica sets to be less-awful.

Hostname are still somewhat broken in this representation, because we
have an array of hosts expressed as a list, but this is the
minimum-effort solution to getting format to be able to reprint a parsed
replica set correctly.

I understand that we probably don't want to merge this (for a lot of
reasons), but at least this shows exactly where the issue is, and yields
some useful discussion.
This commit is contained in:
Benjamin Woodruff
2016-03-14 13:29:02 -07:00
parent 81f3a79f04
commit 836582fdb1
2 changed files with 996 additions and 1 deletions

View File

@@ -1,7 +1,7 @@
import MongoCollection from './MongoCollection';
import MongoSchemaCollection from './MongoSchemaCollection';
import {parse as parseUrl, format as formatUrl} from 'url';
import {parse as parseUrl, format as formatUrl} from './mongodbUrl';
let mongodb = require('mongodb');
let MongoClient = mongodb.MongoClient;