Permalink
Browse files

fix url.auth problem

  • Loading branch information...
1 parent 156bffc commit 66f0fdb4f7c55619cdcdb593e93c7ccbc1832886 @undoZen undoZen committed Jan 9, 2014
Showing with 3 additions and 3 deletions.
  1. +3 −3 lib/connect-redis.js
View
@@ -52,11 +52,11 @@ module.exports = function(connect){
if (options.url) {
var url = require('url').parse(options.url);
if (url.protocol === 'redis:') {
- if (url.user) {
- var userparts = url.user.split(":");
+ if (url.auth) {
+ var userparts = url.auth.split(":");
options.user = userparts[0];
if (userparts.length === 2) {
- options.pass = urlparts[1];
+ options.pass = userparts[1];
}
}
options.host = url.hostname;

0 comments on commit 66f0fdb

Please sign in to comment.