This should also work for https.