diff --git a/src/ImageData/CartaFitsImage.cc b/src/ImageData/CartaFitsImage.cc index 9f063e9be..bb059d2e7 100644 --- a/src/ImageData/CartaFitsImage.cc +++ b/src/ImageData/CartaFitsImage.cc @@ -240,6 +240,7 @@ fitsfile* CartaFitsImage::OpenFile() { fits_open_file(&fptr, _filename.c_str(), iomode, &status); if (status) { + fits_report_error(stdout, status); char err_text[30]; fits_get_errstatus(status, err_text); std::string error(err_text); diff --git a/src/Util/File.cc b/src/Util/File.cc index 47ffc7833..c4388535a 100644 --- a/src/Util/File.cc +++ b/src/Util/File.cc @@ -8,6 +8,7 @@ #include #include +#include #include "String.h" @@ -35,7 +36,8 @@ bool IsCompressedFits(const std::string& filename) { } bool IsRemoteHttpFile(const std::string& filename) { - return filename.find("http") == 0; + const std::regex is_http_url("^https?://"); + return std::regex_search(filename, is_http_url); } bool IsGzMagicNumber(uint32_t magic_number) {