Fossil SCM
Fix the --localhost option on the "server" command. Ticket [e704dbd9676]
Commit
760eeb93e04de60bd39cd1f099cf3360efab77b6
Parent
ae0124439685c11…
1 file changed
+3
-2
+3
-2
| --- src/main.c | ||
| +++ src/main.c | ||
| @@ -1803,18 +1803,19 @@ | ||
| 1803 | 1803 | zPort = find_option("port", "P", 1); |
| 1804 | 1804 | zNotFound = find_option("notfound", 0, 1); |
| 1805 | 1805 | zAltBase = find_option("baseurl", 0, 1); |
| 1806 | 1806 | if( zAltBase ){ |
| 1807 | 1807 | set_base_url(zAltBase); |
| 1808 | + } | |
| 1809 | + if ( find_option("localhost", 0, 0)!=0 ){ | |
| 1810 | + flags |= HTTP_SERVER_LOCALHOST; | |
| 1808 | 1811 | } |
| 1809 | 1812 | if( g.argc!=2 && g.argc!=3 ) usage("?REPOSITORY?"); |
| 1810 | 1813 | isUiCmd = g.argv[1][0]=='u'; |
| 1811 | 1814 | if( isUiCmd ){ |
| 1812 | 1815 | flags |= HTTP_SERVER_LOCALHOST; |
| 1813 | 1816 | g.useLocalauth = 1; |
| 1814 | - }else if ( find_option("localhost", 0, 0)!=0 ){ | |
| 1815 | - flags |= HTTP_SERVER_LOCALHOST; | |
| 1816 | 1817 | } |
| 1817 | 1818 | find_server_repository(isUiCmd && zNotFound==0); |
| 1818 | 1819 | if( zPort ){ |
| 1819 | 1820 | int i; |
| 1820 | 1821 | for(i=strlen(zPort)-1; i>=0 && zPort[i]!=':'; i--){} |
| 1821 | 1822 |
| --- src/main.c | |
| +++ src/main.c | |
| @@ -1803,18 +1803,19 @@ | |
| 1803 | zPort = find_option("port", "P", 1); |
| 1804 | zNotFound = find_option("notfound", 0, 1); |
| 1805 | zAltBase = find_option("baseurl", 0, 1); |
| 1806 | if( zAltBase ){ |
| 1807 | set_base_url(zAltBase); |
| 1808 | } |
| 1809 | if( g.argc!=2 && g.argc!=3 ) usage("?REPOSITORY?"); |
| 1810 | isUiCmd = g.argv[1][0]=='u'; |
| 1811 | if( isUiCmd ){ |
| 1812 | flags |= HTTP_SERVER_LOCALHOST; |
| 1813 | g.useLocalauth = 1; |
| 1814 | }else if ( find_option("localhost", 0, 0)!=0 ){ |
| 1815 | flags |= HTTP_SERVER_LOCALHOST; |
| 1816 | } |
| 1817 | find_server_repository(isUiCmd && zNotFound==0); |
| 1818 | if( zPort ){ |
| 1819 | int i; |
| 1820 | for(i=strlen(zPort)-1; i>=0 && zPort[i]!=':'; i--){} |
| 1821 |
| --- src/main.c | |
| +++ src/main.c | |
| @@ -1803,18 +1803,19 @@ | |
| 1803 | zPort = find_option("port", "P", 1); |
| 1804 | zNotFound = find_option("notfound", 0, 1); |
| 1805 | zAltBase = find_option("baseurl", 0, 1); |
| 1806 | if( zAltBase ){ |
| 1807 | set_base_url(zAltBase); |
| 1808 | } |
| 1809 | if ( find_option("localhost", 0, 0)!=0 ){ |
| 1810 | flags |= HTTP_SERVER_LOCALHOST; |
| 1811 | } |
| 1812 | if( g.argc!=2 && g.argc!=3 ) usage("?REPOSITORY?"); |
| 1813 | isUiCmd = g.argv[1][0]=='u'; |
| 1814 | if( isUiCmd ){ |
| 1815 | flags |= HTTP_SERVER_LOCALHOST; |
| 1816 | g.useLocalauth = 1; |
| 1817 | } |
| 1818 | find_server_repository(isUiCmd && zNotFound==0); |
| 1819 | if( zPort ){ |
| 1820 | int i; |
| 1821 | for(i=strlen(zPort)-1; i>=0 && zPort[i]!=':'; i--){} |
| 1822 |