On Thu, Aug 14, 2014 at 3:43 PM, Stephan Beal <[email protected]> wrote:
> On Thu, Aug 14, 2014 at 2:31 PM, Baruch Burstein <[email protected]> > wrote: > >> BTW, why is this done like this on Windows, instead of doing the same as >> linux (where the HTTP requests are handled directly by the server instance >> of fossil)? >> > > Can't say - i don't do Windows. It surprises me as well. It seems that the > server impl has diverged into a windows-specific one since i last looked at > those bits. Maybe those bits are missing an open-a-repo check/step. Looking > at it now, i apparently understand too little of it to see if there's a > difference in this regard. Ah, here we go: > > main.c has a big #if block in which find_server_repository() is done in > the non-Windows block, and (apparently) not in the Windows block. i don't > dare touch the Windows code, though, as i can't test it. > It is more complex than that. As far as I can tell, on Windows the flow is like this: 1) `fossil ui` starts a server, binds to a port, etc. 2) A HTTP request is received by this instance. 3) The HTTP request is saved into a file 4) The server spawns a completely new instance of the fossil executable, passing it the `http` command, along with the file from step 3 and the repository and a bunch of other stuff. 5) This new instance of fossil builds the HTTP response and saves it into a file. 6) After the second instance terminates, the server takes the resulting file and sends it's content as the HTTP response to step 2 find_server_repository is indeed called in the second instance of fossil, but since it's command line is different than the command line passed to the first instance, it does not open the current repository at all. I can't figure out the logic behind this system. -- ˙uʍop-ǝpısdn sı ɹoʇıuoɯ ɹnoʎ 'sıɥʇ pɐǝɹ uɐɔ noʎ ɟı
_______________________________________________ fossil-users mailing list [email protected] http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users

