-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
22 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -110,6 +110,7 @@ var debug = Debug("redis"); | |
* var unixSocketRedis2 = new Redis('/tmp/echo.sock'); | ||
* var urlRedis = new Redis('redis://user:[email protected]:6379/'); | ||
* var urlRedis2 = new Redis('//localhost:6379'); | ||
* var urlRedisTls = new Redis('rediss://user:[email protected]:6379/'); | ||
* var authedRedis = new Redis(6380, '192.168.100.1', { password: 'password' }); | ||
* ``` | ||
*/ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -192,6 +192,16 @@ describe("utils", function() { | |
expect(utils.parseURL("redis://127.0.0.1/")).to.eql({ | ||
host: "127.0.0.1" | ||
}); | ||
expect( | ||
utils.parseURL("rediss://user:[email protected]:6380/4?key=value") | ||
).to.eql({ | ||
tls: true, | ||
host: "127.0.0.1", | ||
port: "6380", | ||
db: "4", | ||
password: "pass", | ||
key: "value" | ||
}); | ||
}); | ||
}); | ||
|
||
|
371bb9c
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you very much:smiley:. This is very useful because someone using a
redis
URL and then changing it to arediss
URL won't need to make any changes or diagnose the problem and try to find out why they can't connect anymore:smiley:.371bb9c
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did someone realised, that this change have broke previous functionality?
I did a small code snippet and tested with
4.13.0
and4.14.0
. Same code works with earlier version, but fails with latest.Results:
with
4.13.0
with
4.14.0