简体   繁体   中英

Determining server-type from http request

I have a web-server written in CPP. I want to determine the server-type of the request. ie whether the request came from http or https URL ?

如果您有自己的用c ++编写的Web服务器,您已经知道它是通过http还是https传入的,因为它们通过不同的端口并需要不同的处理。

Which port you're listening to? By default HTTPS URLs begin with "https://" and use port 443 by default, where HTTP URLs begin with "http://" and use port 80 by default.

There are other questions like how you're managing certificates to serve secure connections?

This article might be helpful - http://java.sun.com/developer/technicalArticles/Security/secureinternet/

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM