This current question relates to an earlier question that was asked here in stackoverflow around 5 years ago:
aiohttp how to expose two port 80 and 443 for http and https?
That question received a useful and very correct answer. See the "Answer" there, which contains the exact code that I'm referring to here.
This methodology works quite well for a single aiohttp-based server to manage both HTTP and HTTPS requests going to the same host. But it still leaves me with the following question:
Within the code that is given within this "Answer", how can we know whether any given request has come to the aiohttp server via HTTP (port 80) or via HTTPS (port 443)?
I want to know this, because I want to write an aiohttp-based request handler that behaves very slightly differently between the receipt of HTTP requests and the receipt of HTTPS requests.