[Http] Use smart pointers to avoid potential crash when downloading urls with redirects.