From 7f8dbf24e72a37cc1b587d7390c6b6274ef581e7 Mon Sep 17 00:00:00 2001 From: Shane Smiskol Date: Thu, 15 Jan 2026 17:18:40 -0800 Subject: [PATCH] Cabana: fix for internal source (#36998) * fix for internal sources from cursor * clean up * more * not needed * clean up * sure --- tools/replay/filereader.cc | 2 +- tools/replay/framereader.cc | 2 +- tools/replay/util.cc | 2 ++ 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/tools/replay/filereader.cc b/tools/replay/filereader.cc index d74aaebab..cb13775a3 100644 --- a/tools/replay/filereader.cc +++ b/tools/replay/filereader.cc @@ -17,7 +17,7 @@ std::string cacheFilePath(const std::string &url) { } std::string FileReader::read(const std::string &file, std::atomic *abort) { - const bool is_remote = file.find("https://") == 0; + const bool is_remote = (file.find("https://") == 0) || (file.find("http://") == 0); const std::string local_file = is_remote ? cacheFilePath(file) : file; std::string result; diff --git a/tools/replay/framereader.cc b/tools/replay/framereader.cc index a5f0f748c..96ec5915b 100644 --- a/tools/replay/framereader.cc +++ b/tools/replay/framereader.cc @@ -72,7 +72,7 @@ FrameReader::~FrameReader() { } bool FrameReader::load(CameraType type, const std::string &url, bool no_hw_decoder, std::atomic *abort, bool local_cache, int chunk_size, int retries) { - auto local_file_path = url.find("https://") == 0 ? cacheFilePath(url) : url; + auto local_file_path = (url.find("https://") == 0 || url.find("http://") == 0) ? cacheFilePath(url) : url; if (!util::file_exists(local_file_path)) { FileReader f(local_cache, chunk_size, retries); if (f.read(url, abort).empty()) { diff --git a/tools/replay/util.cc b/tools/replay/util.cc index 94cea961f..481564322 100644 --- a/tools/replay/util.cc +++ b/tools/replay/util.cc @@ -154,6 +154,8 @@ size_t getRemoteFileSize(const std::string &url, std::atomic *abort) { curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, dumy_write_cb); curl_easy_setopt(curl, CURLOPT_HEADER, 1); curl_easy_setopt(curl, CURLOPT_NOBODY, 1); + curl_easy_setopt(curl, CURLOPT_NOSIGNAL, 1); + curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1L); CURLM *cm = curl_multi_init(); curl_multi_add_handle(cm, curl);