You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by cz...@apache.org on 2022/11/10 15:07:05 UTC

[sling-org-apache-sling-engine] branch master updated: SLING-11669 : Don't call mime type service if extension is null

This is an automated email from the ASF dual-hosted git repository.

cziegeler pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-engine.git


The following commit(s) were added to refs/heads/master by this push:
     new b9abc02  SLING-11669 : Don't call mime type service if extension is null
b9abc02 is described below

commit b9abc023272d8c0155e35c93a9bdb61d53928bf5
Author: Carsten Ziegeler <cz...@apache.org>
AuthorDate: Thu Nov 10 16:06:48 2022 +0100

    SLING-11669 : Don't call mime type service if extension is null
---
 .../org/apache/sling/engine/impl/SlingHttpServletRequestImpl.java     | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/main/java/org/apache/sling/engine/impl/SlingHttpServletRequestImpl.java b/src/main/java/org/apache/sling/engine/impl/SlingHttpServletRequestImpl.java
index 6a5e6c6..13cfa43 100644
--- a/src/main/java/org/apache/sling/engine/impl/SlingHttpServletRequestImpl.java
+++ b/src/main/java/org/apache/sling/engine/impl/SlingHttpServletRequestImpl.java
@@ -262,7 +262,9 @@ public class SlingHttpServletRequestImpl extends HttpServletRequestWrapper imple
     public String getResponseContentType() {
         if (responseContentType == null) {
             final String ext = getRequestPathInfo().getExtension();
-            responseContentType = this.requestData.getSlingRequestProcessor().getMimeType("dummy." + ext);
+            if ( ext != null ) {
+                responseContentType = this.requestData.getSlingRequestProcessor().getMimeType("dummy.".concat(ext));
+            }
         }
         return responseContentType;
     }