Fossil SCM
Fix a duplicated sync repsonse which could trigger using (fossil http) when SSH_CONNECTION is set.
Commit
2146def8af2115d78338e67a5a6dd26fd4772ea959f9d74fde1bde8c83fd5e1c
Parent
4455100420ac18b…
1 file changed
+5
-1
+5
-1
| --- src/main.c | ||
| +++ src/main.c | ||
| @@ -3060,21 +3060,25 @@ | ||
| 3060 | 3060 | } |
| 3061 | 3061 | g.zRepositoryName = enter_chroot_jail( |
| 3062 | 3062 | zChRoot ? zChRoot : g.zRepositoryName, noJail); |
| 3063 | 3063 | if( useSCGI ){ |
| 3064 | 3064 | cgi_handle_scgi_request(); |
| 3065 | + process_one_web_page(zNotFound, glob_create(zFileGlob), allowRepoList); | |
| 3065 | 3066 | }else if( g.fSshClient & CGI_SSH_CLIENT ){ |
| 3067 | + /* ssh_request_loop() processes every request itself, so do not | |
| 3068 | + ** call process_one_web_page() again afterwards: that would answer | |
| 3069 | + ** the last request a second time. */ | |
| 3066 | 3070 | ssh_request_loop(zIpAddr, glob_create(zFileGlob)); |
| 3067 | 3071 | }else{ |
| 3068 | 3072 | #if FOSSIL_ENABLE_SSL |
| 3069 | 3073 | if( g.httpUseSSL ){ |
| 3070 | 3074 | g.httpSSLConn = ssl_new_server(0); |
| 3071 | 3075 | } |
| 3072 | 3076 | #endif |
| 3073 | 3077 | cgi_handle_http_request(zIpAddr); |
| 3078 | + process_one_web_page(zNotFound, glob_create(zFileGlob), allowRepoList); | |
| 3074 | 3079 | } |
| 3075 | - process_one_web_page(zNotFound, glob_create(zFileGlob), allowRepoList); | |
| 3076 | 3080 | #if FOSSIL_ENABLE_SSL |
| 3077 | 3081 | if( g.httpUseSSL && g.httpSSLConn ){ |
| 3078 | 3082 | ssl_close_server(g.httpSSLConn); |
| 3079 | 3083 | g.httpSSLConn = 0; |
| 3080 | 3084 | } |
| 3081 | 3085 |
| --- src/main.c | |
| +++ src/main.c | |
| @@ -3060,21 +3060,25 @@ | |
| 3060 | } |
| 3061 | g.zRepositoryName = enter_chroot_jail( |
| 3062 | zChRoot ? zChRoot : g.zRepositoryName, noJail); |
| 3063 | if( useSCGI ){ |
| 3064 | cgi_handle_scgi_request(); |
| 3065 | }else if( g.fSshClient & CGI_SSH_CLIENT ){ |
| 3066 | ssh_request_loop(zIpAddr, glob_create(zFileGlob)); |
| 3067 | }else{ |
| 3068 | #if FOSSIL_ENABLE_SSL |
| 3069 | if( g.httpUseSSL ){ |
| 3070 | g.httpSSLConn = ssl_new_server(0); |
| 3071 | } |
| 3072 | #endif |
| 3073 | cgi_handle_http_request(zIpAddr); |
| 3074 | } |
| 3075 | process_one_web_page(zNotFound, glob_create(zFileGlob), allowRepoList); |
| 3076 | #if FOSSIL_ENABLE_SSL |
| 3077 | if( g.httpUseSSL && g.httpSSLConn ){ |
| 3078 | ssl_close_server(g.httpSSLConn); |
| 3079 | g.httpSSLConn = 0; |
| 3080 | } |
| 3081 |
| --- src/main.c | |
| +++ src/main.c | |
| @@ -3060,21 +3060,25 @@ | |
| 3060 | } |
| 3061 | g.zRepositoryName = enter_chroot_jail( |
| 3062 | zChRoot ? zChRoot : g.zRepositoryName, noJail); |
| 3063 | if( useSCGI ){ |
| 3064 | cgi_handle_scgi_request(); |
| 3065 | process_one_web_page(zNotFound, glob_create(zFileGlob), allowRepoList); |
| 3066 | }else if( g.fSshClient & CGI_SSH_CLIENT ){ |
| 3067 | /* ssh_request_loop() processes every request itself, so do not |
| 3068 | ** call process_one_web_page() again afterwards: that would answer |
| 3069 | ** the last request a second time. */ |
| 3070 | ssh_request_loop(zIpAddr, glob_create(zFileGlob)); |
| 3071 | }else{ |
| 3072 | #if FOSSIL_ENABLE_SSL |
| 3073 | if( g.httpUseSSL ){ |
| 3074 | g.httpSSLConn = ssl_new_server(0); |
| 3075 | } |
| 3076 | #endif |
| 3077 | cgi_handle_http_request(zIpAddr); |
| 3078 | process_one_web_page(zNotFound, glob_create(zFileGlob), allowRepoList); |
| 3079 | } |
| 3080 | #if FOSSIL_ENABLE_SSL |
| 3081 | if( g.httpUseSSL && g.httpSSLConn ){ |
| 3082 | ssl_close_server(g.httpSSLConn); |
| 3083 | g.httpSSLConn = 0; |
| 3084 | } |
| 3085 |