Comparing version 0.12.1 to 0.12.3
@@ -20,3 +20,3 @@ var dns = require('dns'); | ||
// url parse expects spaces encoded as %20 | ||
str = str.replace(' ', '%20'); | ||
str = encodeURI(str); | ||
var result = url.parse(str); | ||
@@ -65,2 +65,3 @@ var config = {}; | ||
} | ||
params.push("options=--client_encoding='utf-8'"); | ||
dns.lookup(this.host, function(err, address) { | ||
@@ -67,0 +68,0 @@ if(err) return cb(err, null); |
@@ -119,2 +119,4 @@ var net = require('net'); | ||
.addCString(config.database) | ||
.addCString('options') | ||
.addCString("--client_encoding='utf-8'") | ||
.addCString('').flush(); | ||
@@ -121,0 +123,0 @@ //this message is sent without a code |
{ "name": "pg", | ||
"version": "0.12.1", | ||
"version": "0.12.3", | ||
"description": "PostgreSQL client - pure javascript & libpq with the same API", | ||
@@ -4,0 +4,0 @@ "keywords" : ["postgres", "pg", "libpq", "postgre", "database", "rdbms"], |
@@ -152,2 +152,10 @@ var helper = require(__dirname + '/../test-helper'); | ||
test('password contains weird characters', function() { | ||
var strang = 'pg://my first name:is&%awesome!@localhost:9000'; | ||
var subject = new ConnectionParameters(strang); | ||
assert.equal(subject.user, 'my first name'); | ||
assert.equal(subject.password, 'is&%awesome!'); | ||
assert.equal(subject.host, 'localhost'); | ||
}); | ||
}); |
@@ -26,2 +26,4 @@ require(__dirname + "/test-helper"); | ||
.addCString('bang') | ||
.addCString('options') | ||
.addCString("--client_encoding='utf-8'") | ||
.addCString('').join(true)) | ||
@@ -28,0 +30,0 @@ }); |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
255763
6842