Fossil SCM

Fix a duplicated sync repsonse which could trigger using (fossil http) when SSH_CONNECTION is set.

stephan 2026-11-16 11:34 UTC trunk
Commit 2146def8af2115d78338e67a5a6dd26fd4772ea959f9d74fde1bde8c83fd5e1c
1 file changed +5 -1
+5 -1
--- src/main.c
+++ src/main.c
@@ -3060,21 +3060,25 @@
30603060
}
30613061
g.zRepositoryName = enter_chroot_jail(
30623062
zChRoot ? zChRoot : g.zRepositoryName, noJail);
30633063
if( useSCGI ){
30643064
cgi_handle_scgi_request();
3065
+ process_one_web_page(zNotFound, glob_create(zFileGlob), allowRepoList);
30653066
}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. */
30663070
ssh_request_loop(zIpAddr, glob_create(zFileGlob));
30673071
}else{
30683072
#if FOSSIL_ENABLE_SSL
30693073
if( g.httpUseSSL ){
30703074
g.httpSSLConn = ssl_new_server(0);
30713075
}
30723076
#endif
30733077
cgi_handle_http_request(zIpAddr);
3078
+ process_one_web_page(zNotFound, glob_create(zFileGlob), allowRepoList);
30743079
}
3075
- process_one_web_page(zNotFound, glob_create(zFileGlob), allowRepoList);
30763080
#if FOSSIL_ENABLE_SSL
30773081
if( g.httpUseSSL && g.httpSSLConn ){
30783082
ssl_close_server(g.httpSSLConn);
30793083
g.httpSSLConn = 0;
30803084
}
30813085
--- 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

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button