This is an automated email from the ASF dual-hosted git repository.
dataroaring pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/master by this push:
new 5710ccd8b9a [chore](http) return NOT_FOUND if dir is not exists
(#51897)
5710ccd8b9a is described below
commit 5710ccd8b9aa3220c403b701135ce8fd6f8e3e10
Author: walter <[email protected]>
AuthorDate: Mon Jun 23 22:05:09 2025 +0800
[chore](http) return NOT_FOUND if dir is not exists (#51897)
---
be/src/http/utils.cpp | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/be/src/http/utils.cpp b/be/src/http/utils.cpp
index 6639c50ae70..79552c497b9 100644
--- a/be/src/http/utils.cpp
+++ b/be/src/http/utils.cpp
@@ -209,7 +209,13 @@ void do_dir_response(const std::string& dir_path,
HttpRequest* req, bool is_acqu
return;
}
- VLOG_DEBUG << "list dir: " << dir_path << ", file count: " << files.size();
+ VLOG_DEBUG << "list dir: " << dir_path << ", exists: " << exists
+ << ", file count: " << files.size();
+
+ if (!exists) {
+ HttpChannel::send_error(req, HttpStatus::NOT_FOUND);
+ return;
+ }
const std::string FILE_DELIMITER_IN_DIR_RESPONSE = "\n";
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]