Fix bug when testing if a connection is https or http.

Meant to use is_https rather than is_http.