Use proper class for HTTP/S URIs

Changing the scheme of a URI does not change the class, so class-based
checking will not use the proper connection time.

This leads to SSL certificate verify A failed (local end).

This fixes a bug introduced in @872ab85