Fossil SCM
For the "fossil server" command, set the HTTP_SERVER_HAD_REPOSITORY and HTTP_SERVER_HAD_CHECKOUT flags just as they would have been with the "fossil ui" command.
Commit
e4e09884778787f3e7a5dfd6acc90148d33eb68f
Parent
138313df99a6bbf…
1 file changed
+4
-4
+4
-4
| --- src/main.c | ||
| +++ src/main.c | ||
| @@ -2507,13 +2507,13 @@ | ||
| 2507 | 2507 | zBrowser, zIpAddr, zInitPage); |
| 2508 | 2508 | }else{ |
| 2509 | 2509 | zBrowserCmd = mprintf("%s http://localhost:%%d/%s &", |
| 2510 | 2510 | zBrowser, zInitPage); |
| 2511 | 2511 | } |
| 2512 | - if( g.repositoryOpen ) flags |= HTTP_SERVER_HAD_REPOSITORY; | |
| 2513 | - if( g.localOpen ) flags |= HTTP_SERVER_HAD_CHECKOUT; | |
| 2514 | 2512 | } |
| 2513 | + if( g.repositoryOpen ) flags |= HTTP_SERVER_HAD_REPOSITORY; | |
| 2514 | + if( g.localOpen ) flags |= HTTP_SERVER_HAD_CHECKOUT; | |
| 2515 | 2515 | db_close(1); |
| 2516 | 2516 | if( cgi_http_server(iPort, mxPort, zBrowserCmd, zIpAddr, flags) ){ |
| 2517 | 2517 | fossil_fatal("unable to listen on TCP socket %d", iPort); |
| 2518 | 2518 | } |
| 2519 | 2519 | g.sslNotAvailable = 1; |
| @@ -2540,13 +2540,13 @@ | ||
| 2540 | 2540 | zBrowser, zIpAddr, zInitPage); |
| 2541 | 2541 | }else{ |
| 2542 | 2542 | zBrowserCmd = mprintf("%s http://localhost:%%d/%s &", |
| 2543 | 2543 | zBrowser, zInitPage); |
| 2544 | 2544 | } |
| 2545 | - if( g.repositoryOpen ) flags |= HTTP_SERVER_HAD_REPOSITORY; | |
| 2546 | - if( g.localOpen ) flags |= HTTP_SERVER_HAD_CHECKOUT; | |
| 2547 | 2545 | } |
| 2546 | + if( g.repositoryOpen ) flags |= HTTP_SERVER_HAD_REPOSITORY; | |
| 2547 | + if( g.localOpen ) flags |= HTTP_SERVER_HAD_CHECKOUT; | |
| 2548 | 2548 | db_close(1); |
| 2549 | 2549 | if( allowRepoList ){ |
| 2550 | 2550 | flags |= HTTP_SERVER_REPOLIST; |
| 2551 | 2551 | } |
| 2552 | 2552 | if( win32_http_service(iPort, zNotFound, zFileGlob, flags) ){ |
| 2553 | 2553 |
| --- src/main.c | |
| +++ src/main.c | |
| @@ -2507,13 +2507,13 @@ | |
| 2507 | zBrowser, zIpAddr, zInitPage); |
| 2508 | }else{ |
| 2509 | zBrowserCmd = mprintf("%s http://localhost:%%d/%s &", |
| 2510 | zBrowser, zInitPage); |
| 2511 | } |
| 2512 | if( g.repositoryOpen ) flags |= HTTP_SERVER_HAD_REPOSITORY; |
| 2513 | if( g.localOpen ) flags |= HTTP_SERVER_HAD_CHECKOUT; |
| 2514 | } |
| 2515 | db_close(1); |
| 2516 | if( cgi_http_server(iPort, mxPort, zBrowserCmd, zIpAddr, flags) ){ |
| 2517 | fossil_fatal("unable to listen on TCP socket %d", iPort); |
| 2518 | } |
| 2519 | g.sslNotAvailable = 1; |
| @@ -2540,13 +2540,13 @@ | |
| 2540 | zBrowser, zIpAddr, zInitPage); |
| 2541 | }else{ |
| 2542 | zBrowserCmd = mprintf("%s http://localhost:%%d/%s &", |
| 2543 | zBrowser, zInitPage); |
| 2544 | } |
| 2545 | if( g.repositoryOpen ) flags |= HTTP_SERVER_HAD_REPOSITORY; |
| 2546 | if( g.localOpen ) flags |= HTTP_SERVER_HAD_CHECKOUT; |
| 2547 | } |
| 2548 | db_close(1); |
| 2549 | if( allowRepoList ){ |
| 2550 | flags |= HTTP_SERVER_REPOLIST; |
| 2551 | } |
| 2552 | if( win32_http_service(iPort, zNotFound, zFileGlob, flags) ){ |
| 2553 |
| --- src/main.c | |
| +++ src/main.c | |
| @@ -2507,13 +2507,13 @@ | |
| 2507 | zBrowser, zIpAddr, zInitPage); |
| 2508 | }else{ |
| 2509 | zBrowserCmd = mprintf("%s http://localhost:%%d/%s &", |
| 2510 | zBrowser, zInitPage); |
| 2511 | } |
| 2512 | } |
| 2513 | if( g.repositoryOpen ) flags |= HTTP_SERVER_HAD_REPOSITORY; |
| 2514 | if( g.localOpen ) flags |= HTTP_SERVER_HAD_CHECKOUT; |
| 2515 | db_close(1); |
| 2516 | if( cgi_http_server(iPort, mxPort, zBrowserCmd, zIpAddr, flags) ){ |
| 2517 | fossil_fatal("unable to listen on TCP socket %d", iPort); |
| 2518 | } |
| 2519 | g.sslNotAvailable = 1; |
| @@ -2540,13 +2540,13 @@ | |
| 2540 | zBrowser, zIpAddr, zInitPage); |
| 2541 | }else{ |
| 2542 | zBrowserCmd = mprintf("%s http://localhost:%%d/%s &", |
| 2543 | zBrowser, zInitPage); |
| 2544 | } |
| 2545 | } |
| 2546 | if( g.repositoryOpen ) flags |= HTTP_SERVER_HAD_REPOSITORY; |
| 2547 | if( g.localOpen ) flags |= HTTP_SERVER_HAD_CHECKOUT; |
| 2548 | db_close(1); |
| 2549 | if( allowRepoList ){ |
| 2550 | flags |= HTTP_SERVER_REPOLIST; |
| 2551 | } |
| 2552 | if( win32_http_service(iPort, zNotFound, zFileGlob, flags) ){ |
| 2553 |