Diff
Not logged in

Differences From:

File src/winhttp.c part of check-in [53db94cd41] - Make sure the socket of the "ui" and "server" commands is bound to the specified port when the -P or --port option is used. Ticket 7ef970e4a2 by drh on 2008-11-19 23:33:47. [view]

To:

File src/winhttp.c part of check-in [7a2c37063a] - merge trunk into creole branch by bob on 2009-09-22 07:49:39. Also file src/winhttp.c part of check-in [7343126617842a] - Fix the "ui"/"server" command for win32 so that it works even if run from cygwin in a directory that contains a space in its name. by drh on 2009-09-11 21:05:51. [view]

@@ -110,13 +110,13 @@
     wanted -= got;
   }
   fclose(out);
   out = 0;
-  sprintf(zCmd, "%s http \"%s\" %s %s %s",
+  sprintf(zCmd, "\"%s\" http \"%s\" %s %s %s",
     g.argv[0], g.zRepositoryName, zRequestFName, zReplyFName,
     inet_ntoa(p->addr.sin_addr)
   );
-  system(zCmd);
+  portable_system(zCmd);
   in = fopen(zReplyFName, "rb");
   if( in ){
     while( (got = fread(zHdr, 1, sizeof(zHdr), in))>0 ){
       send(p->s, zHdr, got, 0);
@@ -178,9 +178,9 @@
   printf("Listening for HTTP requests on TCP port %d\n", iPort);
   if( zBrowser ){
     zBrowser = mprintf(zBrowser, iPort);
     printf("Launch webbrowser: %s\n", zBrowser);
-    system(zBrowser);
+    portable_system(zBrowser);
   }
   printf("Type Ctrl-C to stop the HTTP server\n");
   for(;;){
     SOCKET client;