FELIX-5110 : HTTP resources content type are not set when using whiteboard pattern. Apply patch from Xavier Fournet

git-svn-id: https://svn.apache.org/repos/asf/felix/trunk@1715385 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/http/base/src/main/java/org/apache/felix/http/base/internal/whiteboard/PerBundleServletContextImpl.java b/http/base/src/main/java/org/apache/felix/http/base/internal/whiteboard/PerBundleServletContextImpl.java
index b68b3ca..25ab5d7 100644
--- a/http/base/src/main/java/org/apache/felix/http/base/internal/whiteboard/PerBundleServletContextImpl.java
+++ b/http/base/src/main/java/org/apache/felix/http/base/internal/whiteboard/PerBundleServletContextImpl.java
@@ -44,6 +44,7 @@
 
 import org.apache.felix.http.base.internal.context.ExtServletContext;
 import org.apache.felix.http.base.internal.registry.EventListenerRegistry;
+import org.apache.felix.http.base.internal.util.MimeTypes;
 import org.osgi.framework.Bundle;
 import org.osgi.framework.wiring.BundleWiring;
 import org.osgi.service.http.context.ServletContextHelper;
@@ -122,7 +123,12 @@
     @Override
     public String getMimeType(final String name)
     {
-        return this.contextHelper.getMimeType(name);
+        String type = this.contextHelper.getMimeType(name);
+        if (type != null) {
+            return type;
+        }
+
+        return MimeTypes.get().getByFile(name);
     }
 
     @Override