message: Retry mechanism for sporadically failing keep-alive
diff: @@ -151,11 +151,10 @@ unique_ptr<ResponseWrapper> HTTPFileSystem::GetRangeRequest(FileHandle &handle,
  headers->insert(std::pair<std::string, std::string>("Range", range_expr));
  idx_t out_offset = 0;
  + idx_t tries = 0;
  + idx_t max_tries = 2;
  - // New connection? -> setting up a new client like this is actually quite expensive
  -// auto client = GetClient(hfs.http_params, proto_host_port.c_str());
  -
  -// auto res = client->Get(
  + while(true) {
  auto res = hfs.http_client->Get(
  path.c_str(), *headers,
  [&](const duckdb_httplib_openssl::Response &response) {
  @@ -177,11 +176,24 @@ unique_ptr<ResponseWrapper> HTTPFileSystem::GetRangeRequest(FileHandle &handle,
  out_offset += data_length;
  return true;
  });
  - if (res.error() != duckdb_httplib_openssl::Error::Success) {
  +
  + if (res.error() == duckdb_httplib_openssl::Error::Success) {
  + return make_unique<ResponseWrapper>(res.value());
  + } else {
  + // Retry mechanism for the keep-alive connection: sometimes the connection times out and the request will fail
  + // with a Read error. Refreshing the connection will solve this.
  +
  + if (res.error() == duckdb_httplib_openssl::Error::Read) {
  + tries += 1;
  + hfs.http_client = GetClient(hfs.http_params, proto_host_port.c_str());
  + }
  +
  + if (tries >= max_tries) {
  throw std::runtime_error("HTTP GET error on '" + url + "' (Error code " + std::to_string((int)res.error()) +
  ")");
  }
  - return make_unique<ResponseWrapper>(res.value());
  + }
  + }
  }
  HTTPFileHandle::HTTPFileHandle(FileSystem &fs, std::string path, uint8_t flags, const HTTPParams &http_params)
  