I just want to remember that it is possible to get the protocol from Http.request.url, but this needs processing. Ideally the request should have that information as a property.
I just tested the getScheme() method and it seems to work fine. I think it would be worth using the isSecure() method as well and have both properties available:
Http.request.scheme
Http.request.is_secure
This would make things consistent with the servlets API.