This is only to report on a couple of issues I experienced (as a beginner with web applications) when using http_server, which might be of help to others (apologies if the issues are naive):
Under Windows, it seems that the default number of workers (5) is not enough for more than 3 or 4 clients: the browser seems to wait forever for the server response. Increasing this number fixes the issue. However, Ubuntu handles this much better.
I struggled with SSL not working (seemed like the server was not responding in the browser) simply because I forgot to include the library http_ssl_plugin. There were neither warnings nor errors highlighting its absence.
Which Prolog version are we talking about? And, are you loading the individual server libraries or the new http_server.pl that configures a default reasonable server? The latter includes the library http_dyn_workers, which makes the worker scheduling dynamic. Never tested this on Windows, although I see no reason why it should not work.
Also for (2) I’d like to know how you’ve set it up. On non-Windows I advice to use http_unix_daemon.pl that takes care of all this stuff. Ideally there should be a Windows equivalent … The Unix version doesn’t work on Windows as it involves quite a few tasks that are POSIX specific such as forking, detaching from the terminal, opening ports < 1000 and then dropping rights, etc.
So, I’m not using the new http_server.pl. I’ll try this following Section 3 (SWI-Prolog HTTP support) in the on-line manual.
For (2), I simply opened a terminal in an open account for these tests and ran swipl, but I’ll follow your advice w.r.t. http_unix_daemon.pl in Ubuntu. For Windows, I’ll try to automatically start a process at start-up (maybe with Task Planner).
Thanks. As the HTTP client already autoloads the SSL plugin if the arguments demand SSL, I also added this to the server. The low worker issue is IMO addressed in 8.x, so the next user should have a smoother experience