Fossil SCM

Improvements to "fossil ui/server" on Windows.

drh 2025-02-14 17:36 trunk
Commit f8e522e4673c698b063f2de8e0c1d6a2c4251fb641dd9e87b179cf010dce108d
1 file changed +11 -16
+11 -16
--- src/winhttp.c
+++ src/winhttp.c
@@ -413,28 +413,23 @@
413413
/*
414414
** The repository name is only needed if there was no open check-out. This
415415
** is designed to allow the open check-out for the interactive user to work
416416
** with the local Fossil server started via the "ui" command.
417417
*/
418
- zIp = SocketAddr_toString(&p->addr);
419
- if( (p->flags & HTTP_SERVER_HAD_CHECKOUT)==0 ){
420
- assert( g.zRepositoryName && g.zRepositoryName[0] );
421
- sqlite3_snprintf(sizeof(zCmd), zCmd,
422
- "%s--in %s\n--out %s\n--ipaddr %s\n--as %s\n%s",
423
- get_utf8_bom(0), zRequestFName, zReplyFName, zIp, g.zCmdName,
424
- g.zRepositoryName
425
- );
426
- }else{
427
- sqlite3_snprintf(sizeof(zCmd), zCmd,
428
- "%s--in %s\n--out %s\n--ipaddr %s\n--as %s\n",
429
- get_utf8_bom(0), zRequestFName, zReplyFName, zIp, g.zCmdName
430
- );
431
- }
432
- fossil_free(zIp);
433418
aux = fossil_fopen(zCmdFName, "wb");
434419
if( aux==0 ) goto end_request;
435
- fwrite(zCmd, 1, strlen(zCmd), aux);
420
+ fprintf(aux, "%s--in %s\n", get_utf8_bom(0), zRequestFName);
421
+ zIp = SocketAddr_toString(&p->addr);
422
+ fprintf(aux, "--out %s\n--ipaddr %s\n", zReplyFName, zIp);
423
+ fossil_free(zIp);
424
+ fprintf(aux, "--as %s\n", g.zCmdName);
425
+ if( g.zErrlog && g.zErrlog[0] ){
426
+ fprintf(aux,"--errorlog %s\n", g.zErrlog);
427
+ }
428
+ if( (p->flags & HTTP_SERVER_HAD_CHECKOUT)==0 ){
429
+ fprintf(aux,"%s",g.zRepositoryName);
430
+ }
436431
437432
sqlite3_snprintf(sizeof(zCmd), zCmd,
438433
"\"%s\" http -args \"%s\"%s%s",
439434
g.nameOfExe, zCmdFName,
440435
g.httpUseSSL ? "" : " --nossl", p->zOptions
441436
--- src/winhttp.c
+++ src/winhttp.c
@@ -413,28 +413,23 @@
413 /*
414 ** The repository name is only needed if there was no open check-out. This
415 ** is designed to allow the open check-out for the interactive user to work
416 ** with the local Fossil server started via the "ui" command.
417 */
418 zIp = SocketAddr_toString(&p->addr);
419 if( (p->flags & HTTP_SERVER_HAD_CHECKOUT)==0 ){
420 assert( g.zRepositoryName && g.zRepositoryName[0] );
421 sqlite3_snprintf(sizeof(zCmd), zCmd,
422 "%s--in %s\n--out %s\n--ipaddr %s\n--as %s\n%s",
423 get_utf8_bom(0), zRequestFName, zReplyFName, zIp, g.zCmdName,
424 g.zRepositoryName
425 );
426 }else{
427 sqlite3_snprintf(sizeof(zCmd), zCmd,
428 "%s--in %s\n--out %s\n--ipaddr %s\n--as %s\n",
429 get_utf8_bom(0), zRequestFName, zReplyFName, zIp, g.zCmdName
430 );
431 }
432 fossil_free(zIp);
433 aux = fossil_fopen(zCmdFName, "wb");
434 if( aux==0 ) goto end_request;
435 fwrite(zCmd, 1, strlen(zCmd), aux);
 
 
 
 
 
 
 
 
 
 
436
437 sqlite3_snprintf(sizeof(zCmd), zCmd,
438 "\"%s\" http -args \"%s\"%s%s",
439 g.nameOfExe, zCmdFName,
440 g.httpUseSSL ? "" : " --nossl", p->zOptions
441
--- src/winhttp.c
+++ src/winhttp.c
@@ -413,28 +413,23 @@
413 /*
414 ** The repository name is only needed if there was no open check-out. This
415 ** is designed to allow the open check-out for the interactive user to work
416 ** with the local Fossil server started via the "ui" command.
417 */
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
418 aux = fossil_fopen(zCmdFName, "wb");
419 if( aux==0 ) goto end_request;
420 fprintf(aux, "%s--in %s\n", get_utf8_bom(0), zRequestFName);
421 zIp = SocketAddr_toString(&p->addr);
422 fprintf(aux, "--out %s\n--ipaddr %s\n", zReplyFName, zIp);
423 fossil_free(zIp);
424 fprintf(aux, "--as %s\n", g.zCmdName);
425 if( g.zErrlog && g.zErrlog[0] ){
426 fprintf(aux,"--errorlog %s\n", g.zErrlog);
427 }
428 if( (p->flags & HTTP_SERVER_HAD_CHECKOUT)==0 ){
429 fprintf(aux,"%s",g.zRepositoryName);
430 }
431
432 sqlite3_snprintf(sizeof(zCmd), zCmd,
433 "\"%s\" http -args \"%s\"%s%s",
434 g.nameOfExe, zCmdFName,
435 g.httpUseSSL ? "" : " --nossl", p->zOptions
436

Keyboard Shortcuts

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