libmicrohttpd
[Top][All Lists]
Advanced

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

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


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

Hello listers,

Sometimes, we need to check if the client does a request from HTTP or HTTPS protocol, and then take a decision. In nginx I use it to redirect all requests from HTTP URL to the HTTPS URL.

I took a look how NodeJS does it, because it has the `protocol` property on its request object:

https://github.com/expressjs/express/blob/master/lib/request.js#L288

Does anybody know if I can do something like this with MHD? I searched some function or flag, but I couldn't find that.

Thank you!

--
Silvio Clécio

reply via email to

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