HTTPS support
Merged with upstread