ran into a problem, the server always responds with HTTP 1.1, how to make it work with http 2 ?
HTTP 2 is a very different protocol that would require serious work to implement. For a client, I wrote one a while ago, but I’m not aware of a Prolog server implementation for the same.
I guess it should be possible to add http2 to the server, but indeed it will be a bit of work. For now, if you really need it, the best is probably to use a proxy such as nginx.
I’m not sure what’s wrong with http2. I set up a backend for netlify.com and see that they accept as http 2. I also see that the https server is giving an invalid certificate. I made a request to the openssl s_client server and I see the difference when the certificate gives cowboy and swi https
CONNECTED(00000003) depth=0 CN = v.hopto.org verify error:num=20:unable to get local issuer certificate verify return:1 depth=0 CN = v.hopto.org verify error:num=21:unable to verify the first certificate verify return:1 depth=0 CN = v.hopto.org verify return:1
CONNECTED(00000003) depth=2 C = US, O = Internet Security Research Group, CN = ISRG Root X1 verify return:1 depth=1 C = US, O = Let's Encrypt, CN = R3 verify return:1 depth=0 CN = v.hopto.org verify return:1
I use the same certificate and key for both servers. Everything is running on the same host. Through curl, requests to the backend go through without problems, with a redirect through netlify there are problems.
it looks like there is some problem with the certificates, I installed the certificate files along with the root certificate, but the server does not give the root certificate as I understand it.