Re: [libmicrohttpd] How do I check if the request was done from HTTP or HTTPS?

2016-02-23 Thread silvioprog
Eureka! It seems that starting two daemons is better way instead of MHD_CONNECTION_INFO_GNUTLS_SESSION: just redirect all requests from daemon:80 to daemon:443. Great idea CG, thanks very much! :-) On Tue, Feb 23, 2016 at 10:31 PM, Christian Grothoff wrote: > Hi! > > Well,

Re: [libmicrohttpd] How do I check if the request was done from HTTP or HTTPS?

2016-02-23 Thread Christian Grothoff
Hi! Well, to run MHD with both HTTP and HTTPS-support, you need to start the daemon twice. That means you can pass a different callback or a different closure to distinguish. You could also try to get access to the TLS/SSL handle via MHD_CONNECTION_INFO_GNUTLS_SESSION, which would fail for HTTP