Fossil SCM
When generating a repository name from the URL, include parsing of port to avoid undesirable behavior discovered in [forum:4409f66dae988dc5] in which the parser doesn't handle single-label host names which include a port (with or without a final slash).
Commit
000f80213eb639b4b108c6a60071360a2c220da40a7e23dad086439ed09ef765
Parent
36bec9adac08497…
1 file changed
+2
-1
+2
-1
| --- src/url.c | ||
| +++ src/url.c | ||
| @@ -677,11 +677,12 @@ | ||
| 677 | 677 | ** But don't remove the "www." prefix if what follows is the suffix. |
| 678 | 678 | ** forum:/forumpost/74e111a2ee */ |
| 679 | 679 | zTail += 4; |
| 680 | 680 | } |
| 681 | 681 | if( zTail[0]==0 ) return 0; |
| 682 | - for(i=0; zTail[i] && zTail[i]!='.' && zTail[i]!='?'; i++){} | |
| 682 | + for(i=0; zTail[i] && zTail[i]!='.' && zTail[i]!='?' && | |
| 683 | + zTail[i]!=':' && zTail[i]!='/'; i++){} | |
| 683 | 684 | if( i==0 ) return 0; |
| 684 | 685 | return mprintf("%.*s", i, zTail); |
| 685 | 686 | } |
| 686 | 687 | |
| 687 | 688 | /* |
| 688 | 689 |
| --- src/url.c | |
| +++ src/url.c | |
| @@ -677,11 +677,12 @@ | |
| 677 | ** But don't remove the "www." prefix if what follows is the suffix. |
| 678 | ** forum:/forumpost/74e111a2ee */ |
| 679 | zTail += 4; |
| 680 | } |
| 681 | if( zTail[0]==0 ) return 0; |
| 682 | for(i=0; zTail[i] && zTail[i]!='.' && zTail[i]!='?'; i++){} |
| 683 | if( i==0 ) return 0; |
| 684 | return mprintf("%.*s", i, zTail); |
| 685 | } |
| 686 | |
| 687 | /* |
| 688 |
| --- src/url.c | |
| +++ src/url.c | |
| @@ -677,11 +677,12 @@ | |
| 677 | ** But don't remove the "www." prefix if what follows is the suffix. |
| 678 | ** forum:/forumpost/74e111a2ee */ |
| 679 | zTail += 4; |
| 680 | } |
| 681 | if( zTail[0]==0 ) return 0; |
| 682 | for(i=0; zTail[i] && zTail[i]!='.' && zTail[i]!='?' && |
| 683 | zTail[i]!=':' && zTail[i]!='/'; i++){} |
| 684 | if( i==0 ) return 0; |
| 685 | return mprintf("%.*s", i, zTail); |
| 686 | } |
| 687 | |
| 688 | /* |
| 689 |