Skip to content

Commit

Permalink
Issue #6544 - Remove braces
Browse files Browse the repository at this point in the history
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
  • Loading branch information
joakime committed Jul 30, 2021
1 parent 3868360 commit d5da842
Showing 1 changed file with 0 additions and 3 deletions.
Expand Up @@ -163,15 +163,12 @@ private String getContentTypeFromRequest(String filename, HttpServletRequest req
String defaultContentType = "application/octet-stream";
if (req.getParameter("type") != null)
defaultContentType = req.getParameter("type");

ServletContextHandler servletContextHandler = ServletContextHandler.getServletContextHandler(getServletContext());
if (servletContextHandler == null)
return defaultContentType;
String contentType = servletContextHandler.getMimeTypes().getMimeByExtension(filename);
if (contentType != null)
{
return contentType;
}
return defaultContentType;
}
}
Expand Down

0 comments on commit d5da842

Please sign in to comment.