| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 055d39c commit be9d9bd
2 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -564,8 +564,10 @@ Url.prototype.resolveObject = function(relative) { | |||
| 564 | 564 | ||
| 565 | 565 | if (isRelAbs) { | |
| 566 | 566 | // it's absolute. | |
| 567 | - result.host = (relative.host || relative.host === '') ? | ||
| 568 | - relative.host : result.host; | ||
| 567 | + if (relative.host || relative.host === '') { | ||
| 568 | + result.host = relative.host; | ||
| 569 | + result.port = relative.port; | ||
| 570 | + } | ||
| 569 | 571 | result.hostname = (relative.hostname || relative.hostname === '') ? | |
| 570 | 572 | relative.hostname : result.hostname; | |
| 571 | 573 | result.search = relative.search; | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1513,7 +1513,13 @@ var relativeTests2 = [ | |||
| 1513 | 1513 | //changeing auth | |
| 1514 | 1514 | ['http://diff:auth@www.example.com', | |
| 1515 | 1515 | 'http://asdf:qwer@www.example.com', | |
| 1516 | - 'http://diff:auth@www.example.com/'] | ||
| 1516 | + 'http://diff:auth@www.example.com/'], | ||
| 1517 | + | ||
| 1518 | + // changing port | ||
| 1519 | + ['https://example.com:81/', | ||
| 1520 | + 'https://example.com:82/', | ||
| 1521 | + 'https://example.com:81/'] | ||
| 1522 | + | ||
| 1517 | 1523 | ]; | |
| 1518 | 1524 | relativeTests2.forEach(function(relativeTest) { | |
| 1519 | 1525 | const a = url.resolve(relativeTest[1], relativeTest[0]); | |
| Back | FazBrowse Home | New Git URL |
0 commit comments