Fossil SCM

Fix "fossil test-xfer", which printed the robot captcha and then crashed. cmd_test_xfer() now sets g.zPath and g.zContentType before calling page_xfer().

dmestas 2026-11-12 04:04 UTC small-fixes
Commit a9ebd3c3dca8b8fe3a443d145c34594fa36f7863d1cc0406e0579876aa882bf5
1 file changed +2
+2
--- src/xfer.c
+++ src/xfer.c
@@ -2019,10 +2019,12 @@
20192019
}
20202020
if( zHost==0 ) zHost = "localhost:8080";
20212021
g.zBaseURL = mprintf("http://%s", zHost);
20222022
g.zHttpsURL = mprintf("https://%s", zHost);
20232023
g.zTop = mprintf("");
2024
+ g.zPath = "xfer"; /* So that robot_restrict() sees this as a sync request */
2025
+ g.zContentType = "application/x-fossil-uncompressed";
20242026
blob_zero(&g.cgiIn);
20252027
blob_read_from_file(&g.cgiIn, g.argc==2 ? "-" : g.argv[2], ExtFILE);
20262028
disableLogin = 1;
20272029
page_xfer();
20282030
fossil_print("%s", cgi_extract_content());
20292031
--- src/xfer.c
+++ src/xfer.c
@@ -2019,10 +2019,12 @@
2019 }
2020 if( zHost==0 ) zHost = "localhost:8080";
2021 g.zBaseURL = mprintf("http://%s", zHost);
2022 g.zHttpsURL = mprintf("https://%s", zHost);
2023 g.zTop = mprintf("");
 
 
2024 blob_zero(&g.cgiIn);
2025 blob_read_from_file(&g.cgiIn, g.argc==2 ? "-" : g.argv[2], ExtFILE);
2026 disableLogin = 1;
2027 page_xfer();
2028 fossil_print("%s", cgi_extract_content());
2029
--- src/xfer.c
+++ src/xfer.c
@@ -2019,10 +2019,12 @@
2019 }
2020 if( zHost==0 ) zHost = "localhost:8080";
2021 g.zBaseURL = mprintf("http://%s", zHost);
2022 g.zHttpsURL = mprintf("https://%s", zHost);
2023 g.zTop = mprintf("");
2024 g.zPath = "xfer"; /* So that robot_restrict() sees this as a sync request */
2025 g.zContentType = "application/x-fossil-uncompressed";
2026 blob_zero(&g.cgiIn);
2027 blob_read_from_file(&g.cgiIn, g.argc==2 ? "-" : g.argv[2], ExtFILE);
2028 disableLogin = 1;
2029 page_xfer();
2030 fossil_print("%s", cgi_extract_content());
2031

Keyboard Shortcuts

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