This is an automated email from the ASF dual-hosted git repository.
dataroaring pushed a commit to branch branch-3.0
in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/branch-3.0 by this push:
new 48b953235b2 branch-3.0: [chore](http) return NOT_FOUND if dir is not
exists #51897 (#52155)
48b953235b2 is described below
commit 48b953235b2c7d8de7faaf3681d0c56d44c46176
Author: github-actions[bot]
<41898282+github-actions[bot]@users.noreply.github.com>
AuthorDate: Tue Jun 24 10:29:24 2025 +0800
branch-3.0: [chore](http) return NOT_FOUND if dir is not exists #51897
(#52155)
Cherry-picked from #51897
Co-authored-by: walter <[email protected]>
---
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 ee7a78113e5..7318e281b53 100644
--- a/be/src/http/utils.cpp
+++ b/be/src/http/utils.cpp
@@ -208,7 +208,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]