Fossil SCM
In the "fossil ui" and "fossil server" commands on Windows, use IPv6 for loopback.
Commit
696e14811d0d84ed31069bc3c93071abd574a5069132a5a36b4f002508bf9e1b
Parent
a61922e2bec3a99…
3 files changed
+2
-1
+1
-1
+1
-1
+2
-1
| --- src/cgi.c | ||
| +++ src/cgi.c | ||
| @@ -2039,7 +2039,8 @@ | ||
| 2039 | 2039 | /* |
| 2040 | 2040 | ** Return true if information is coming from the loopback network. |
| 2041 | 2041 | */ |
| 2042 | 2042 | int cgi_is_loopback(const char *zIpAddr){ |
| 2043 | 2043 | return fossil_strcmp(zIpAddr, "127.0.0.1")==0 || |
| 2044 | - fossil_strcmp(zIpAddr, "::ffff:127.0.0.1")==0; | |
| 2044 | + fossil_strcmp(zIpAddr, "::ffff:127.0.0.1")==0 || | |
| 2045 | + fossil_strcmp(zIpAddr, "::1")==0; | |
| 2045 | 2046 | } |
| 2046 | 2047 |
| --- src/cgi.c | |
| +++ src/cgi.c | |
| @@ -2039,7 +2039,8 @@ | |
| 2039 | /* |
| 2040 | ** Return true if information is coming from the loopback network. |
| 2041 | */ |
| 2042 | int cgi_is_loopback(const char *zIpAddr){ |
| 2043 | return fossil_strcmp(zIpAddr, "127.0.0.1")==0 || |
| 2044 | fossil_strcmp(zIpAddr, "::ffff:127.0.0.1")==0; |
| 2045 | } |
| 2046 |
| --- src/cgi.c | |
| +++ src/cgi.c | |
| @@ -2039,7 +2039,8 @@ | |
| 2039 | /* |
| 2040 | ** Return true if information is coming from the loopback network. |
| 2041 | */ |
| 2042 | int cgi_is_loopback(const char *zIpAddr){ |
| 2043 | return fossil_strcmp(zIpAddr, "127.0.0.1")==0 || |
| 2044 | fossil_strcmp(zIpAddr, "::ffff:127.0.0.1")==0 || |
| 2045 | fossil_strcmp(zIpAddr, "::1")==0; |
| 2046 | } |
| 2047 |
+1
-1
| --- src/main.c | ||
| +++ src/main.c | ||
| @@ -2569,11 +2569,11 @@ | ||
| 2569 | 2569 | zBrowser = db_get("web-browser", "start"); |
| 2570 | 2570 | if( zIpAddr ){ |
| 2571 | 2571 | zBrowserCmd = mprintf("%s http://%s:%%d/%s &", |
| 2572 | 2572 | zBrowser, zIpAddr, zInitPage); |
| 2573 | 2573 | }else{ |
| 2574 | - zBrowserCmd = mprintf("%s http://localhost:%%d/%s &", | |
| 2574 | + zBrowserCmd = mprintf("%s http://[::1]:%%d/%s &", | |
| 2575 | 2575 | zBrowser, zInitPage); |
| 2576 | 2576 | } |
| 2577 | 2577 | } |
| 2578 | 2578 | if( g.repositoryOpen ) flags |= HTTP_SERVER_HAD_REPOSITORY; |
| 2579 | 2579 | if( g.localOpen ) flags |= HTTP_SERVER_HAD_CHECKOUT; |
| 2580 | 2580 |
| --- src/main.c | |
| +++ src/main.c | |
| @@ -2569,11 +2569,11 @@ | |
| 2569 | zBrowser = db_get("web-browser", "start"); |
| 2570 | if( zIpAddr ){ |
| 2571 | zBrowserCmd = mprintf("%s http://%s:%%d/%s &", |
| 2572 | zBrowser, zIpAddr, zInitPage); |
| 2573 | }else{ |
| 2574 | zBrowserCmd = mprintf("%s http://localhost:%%d/%s &", |
| 2575 | zBrowser, zInitPage); |
| 2576 | } |
| 2577 | } |
| 2578 | if( g.repositoryOpen ) flags |= HTTP_SERVER_HAD_REPOSITORY; |
| 2579 | if( g.localOpen ) flags |= HTTP_SERVER_HAD_CHECKOUT; |
| 2580 |
| --- src/main.c | |
| +++ src/main.c | |
| @@ -2569,11 +2569,11 @@ | |
| 2569 | zBrowser = db_get("web-browser", "start"); |
| 2570 | if( zIpAddr ){ |
| 2571 | zBrowserCmd = mprintf("%s http://%s:%%d/%s &", |
| 2572 | zBrowser, zIpAddr, zInitPage); |
| 2573 | }else{ |
| 2574 | zBrowserCmd = mprintf("%s http://[::1]:%%d/%s &", |
| 2575 | zBrowser, zInitPage); |
| 2576 | } |
| 2577 | } |
| 2578 | if( g.repositoryOpen ) flags |= HTTP_SERVER_HAD_REPOSITORY; |
| 2579 | if( g.localOpen ) flags |= HTTP_SERVER_HAD_CHECKOUT; |
| 2580 |
+1
-1
| --- src/winhttp.c | ||
| +++ src/winhttp.c | ||
| @@ -376,11 +376,11 @@ | ||
| 376 | 376 | #endif |
| 377 | 377 | if( WSAStartup(MAKEWORD(2,0), &wd) ){ |
| 378 | 378 | fossil_fatal("unable to initialize winsock"); |
| 379 | 379 | } |
| 380 | 380 | if( flags & HTTP_SERVER_LOCALHOST ){ |
| 381 | - zIpAddr = "127.0.0.1"; | |
| 381 | + zIpAddr = "::1"; | |
| 382 | 382 | } |
| 383 | 383 | while( iPort<=mxPort ){ |
| 384 | 384 | DWORD ipv6only = 0; |
| 385 | 385 | s = socket(AF_INET6, SOCK_STREAM, 0); |
| 386 | 386 | if( s==INVALID_SOCKET ){ |
| 387 | 387 |
| --- src/winhttp.c | |
| +++ src/winhttp.c | |
| @@ -376,11 +376,11 @@ | |
| 376 | #endif |
| 377 | if( WSAStartup(MAKEWORD(2,0), &wd) ){ |
| 378 | fossil_fatal("unable to initialize winsock"); |
| 379 | } |
| 380 | if( flags & HTTP_SERVER_LOCALHOST ){ |
| 381 | zIpAddr = "127.0.0.1"; |
| 382 | } |
| 383 | while( iPort<=mxPort ){ |
| 384 | DWORD ipv6only = 0; |
| 385 | s = socket(AF_INET6, SOCK_STREAM, 0); |
| 386 | if( s==INVALID_SOCKET ){ |
| 387 |
| --- src/winhttp.c | |
| +++ src/winhttp.c | |
| @@ -376,11 +376,11 @@ | |
| 376 | #endif |
| 377 | if( WSAStartup(MAKEWORD(2,0), &wd) ){ |
| 378 | fossil_fatal("unable to initialize winsock"); |
| 379 | } |
| 380 | if( flags & HTTP_SERVER_LOCALHOST ){ |
| 381 | zIpAddr = "::1"; |
| 382 | } |
| 383 | while( iPort<=mxPort ){ |
| 384 | DWORD ipv6only = 0; |
| 385 | s = socket(AF_INET6, SOCK_STREAM, 0); |
| 386 | if( s==INVALID_SOCKET ){ |
| 387 |