libmicrohttpd
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


From: silvioprog
Subject: Re: [libmicrohttpd] How do I check if the request was done from HTTP or HTTPS?
Date: Tue, 23 Feb 2016 23:13:49 -0300

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 <address@hidden> wrote:
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 and give you info you might want for HTTPS.

Happy hacking!

Christian

--
Silvio Clécio

reply via email to

[Prev in Thread] Current Thread [Next in Thread]