Can't connect to SSL, having problems sentting headers