Https compatible input stream reading