Skip to content
This repository has been archived by the owner on Apr 22, 2023. It is now read-only.

Plus in protocol #1654

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/url.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ exports.format = urlFormat;

// define these here so at least they only have to be
// compiled once on the first module load.
var protocolPattern = /^([a-z0-9]+:)/i,
var protocolPattern = /^([a-z0-9+]+:)/i,
portPattern = /:[0-9]+$/,
// RFC 2396: characters reserved for delimiting URLs.
delims = ['<', '>', '"', '`', ' ', '\r', '\n', '\t'],
Expand Down
7 changes: 7 additions & 0 deletions test/simple/test-url.js
Original file line number Diff line number Diff line change
Expand Up @@ -335,6 +335,13 @@ var parseTests = {
hostname: 'bucket_name.s3.amazonaws.com',
pathname: '/image.jpg',
href: 'http://bucket_name.s3.amazonaws.com/image.jpg'
},
'git+http://github.com/joyent/node.git': {
protocol: 'git+http:',
slashes: true,
host: 'github.com',
pathname: '/joyent/node.git',
href: 'git+http://github.com/joyent/node.git'
}
};

Expand Down