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().
Commit
a9ebd3c3dca8b8fe3a443d145c34594fa36f7863d1cc0406e0579876aa882bf5
Parent
0fd429ba8188c6a…
1 file changed
+2
+2
| --- src/xfer.c | ||
| +++ src/xfer.c | ||
| @@ -2019,10 +2019,12 @@ | ||
| 2019 | 2019 | } |
| 2020 | 2020 | if( zHost==0 ) zHost = "localhost:8080"; |
| 2021 | 2021 | g.zBaseURL = mprintf("http://%s", zHost); |
| 2022 | 2022 | g.zHttpsURL = mprintf("https://%s", zHost); |
| 2023 | 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"; | |
| 2024 | 2026 | blob_zero(&g.cgiIn); |
| 2025 | 2027 | blob_read_from_file(&g.cgiIn, g.argc==2 ? "-" : g.argv[2], ExtFILE); |
| 2026 | 2028 | disableLogin = 1; |
| 2027 | 2029 | page_xfer(); |
| 2028 | 2030 | fossil_print("%s", cgi_extract_content()); |
| 2029 | 2031 |
| --- 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 |