NihalJain commented on code in PR #6783:
URL: https://github.com/apache/hbase/pull/6783#discussion_r2024770334
##########
hbase-http/src/main/java/org/apache/hadoop/hbase/http/HttpServer.java:
##########
@@ -758,7 +755,9 @@ protected void addDefaultApps(ContextHandlerCollection
parent, final String appD
if (logDir != null) {
ServletContextHandler logContext = new ServletContextHandler(parent,
"/logs");
logContext.addServlet(AdminAuthorizedServlet.class, "/*");
- logContext.setResourceBase(logDir);
+ // We are doing this as otherwise jetty 12 is not handling
/dir0/dir1/../dir2
+ String logDirCanonical = Paths.get(logDir).toFile().getCanonicalPath();
+ logContext.setResourceBase(logDirCanonical);
Review Comment:
Added bug demo at https://github.com/NihalJain/jetty_log_dir_issue.
For Jetty 12:
- <img width="1069" alt="Screenshot 2025-04-02 at 6 21 16 PM"
src="https://github.com/user-attachments/assets/454aa9cc-c493-4006-b7ef-eeab913d7b65"
/>
- Refer
https://github.com/NihalJain/jetty_log_dir_issue/actions/runs/14220016149/job/39845473906
For Jetty 9:
-
<img width="1073" alt="Screenshot 2025-04-02 at 6 22 58 PM"
src="https://github.com/user-attachments/assets/8bc10eb3-56b5-4017-805b-7cce5753fb59"
/>
- Refer
https://github.com/NihalJain/jetty_log_dir_issue/actions/runs/14220016167/job/39845473985
Will report to jetty team with this minimal demo.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]