diff --git a/lib/url.js b/lib/url.js index 82209db01c8c31..1e560482753b0b 100644 --- a/lib/url.js +++ b/lib/url.js @@ -133,7 +133,7 @@ Url.prototype.parse = function(url, parseQueryString, slashesDenoteHost) { if (proto) { proto = proto[0]; var lowerProto = proto.toLowerCase(); - this.protocol = lowerProto; + this.protocol = lowerProto.replace(/.$/, ''); rest = rest.substr(proto.length); }