This is an automated email from the ASF dual-hosted git repository.
adoroszlai pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ozone.git
The following commit(s) were added to refs/heads/master by this push:
new 50a07a73b4 HDDS-11180. Simplify HttpServer2#inferMimeType return
statement (#6963)
50a07a73b4 is described below
commit 50a07a73b40bbefc0d7b84967dd7a220eaad3e2c
Author: Will Xiao <[email protected]>
AuthorDate: Fri Jul 19 01:02:15 2024 +0800
HDDS-11180. Simplify HttpServer2#inferMimeType return statement (#6963)
---
.../src/main/java/org/apache/hadoop/hdds/server/http/HttpServer2.java | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git
a/hadoop-hdds/framework/src/main/java/org/apache/hadoop/hdds/server/http/HttpServer2.java
b/hadoop-hdds/framework/src/main/java/org/apache/hadoop/hdds/server/http/HttpServer2.java
index 649bacbbfc..f27f42e0b4 100644
---
a/hadoop-hdds/framework/src/main/java/org/apache/hadoop/hdds/server/http/HttpServer2.java
+++
b/hadoop-hdds/framework/src/main/java/org/apache/hadoop/hdds/server/http/HttpServer2.java
@@ -1673,8 +1673,7 @@ public final class HttpServer2 implements FilterContainer
{
String path = ((HttpServletRequest) request).getRequestURI();
ServletContextHandler.Context sContext =
(ServletContextHandler.Context) config.getServletContext();
- String mime = sContext.getMimeType(path);
- return (mime == null) ? null : mime;
+ return sContext.getMimeType(path);
}
private void initHttpHeaderMap() {
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]