@@ -744,14 +744,14 @@ Url.prototype.resolveObject = function(relative) {
744
744
var removeAllDots = mustEndAbs ;
745
745
var srcPath = result . pathname && result . pathname . split ( '/' ) || [ ] ;
746
746
var relPath = relative . pathname && relative . pathname . split ( '/' ) || [ ] ;
747
- var psychotic = result . protocol && ! slashedProtocol [ result . protocol ] ;
747
+ var noLeadingSlashes = result . protocol && ! slashedProtocol [ result . protocol ] ;
748
748
749
749
// if the url is a non-slashed url, then relative
750
750
// links like ../.. should be able
751
751
// to crawl up to the hostname, as well. This is strange.
752
752
// result.protocol has already been set by now.
753
753
// Later on, put the first path part into the host field.
754
- if ( psychotic ) {
754
+ if ( noLeadingSlashes ) {
755
755
result . hostname = '' ;
756
756
result . port = null ;
757
757
if ( result . host ) {
@@ -799,7 +799,7 @@ Url.prototype.resolveObject = function(relative) {
799
799
// just pull out the search.
800
800
// like href='?foo'.
801
801
// Put this after the other two cases because it simplifies the booleans
802
- if ( psychotic ) {
802
+ if ( noLeadingSlashes ) {
803
803
result . hostname = result . host = srcPath . shift ( ) ;
804
804
//occasionally the auth can get stuck only in host
805
805
//this especially happens in cases like
@@ -880,7 +880,7 @@ Url.prototype.resolveObject = function(relative) {
880
880
( srcPath [ 0 ] && srcPath [ 0 ] . charAt ( 0 ) === '/' ) ;
881
881
882
882
// put the host back
883
- if ( psychotic ) {
883
+ if ( noLeadingSlashes ) {
884
884
result . hostname = result . host = isAbsolute ? '' :
885
885
srcPath . length ? srcPath . shift ( ) : '' ;
886
886
//occasionally the auth can get stuck only in host
0 commit comments