package jbootweb.util.http;

public class DefaultContentTypeProvider implements ContentTypeProvider {

  public String getContentType(String path) {
    path = path.toLowerCase();
    if (path.endsWith(".js"))
      return "application/javascript";
    if (path.endsWith(".css"))
      return "text/css";

    int dot = path.lastIndexOf(".");
    if (dot != -1)
      return "text/" + path.substring(dot + 1);

    return null;
  }
}

@@ -297,16 +297,88 @@
 xt/css%22;
+%0A    if (path.endsWith(%22.woff%22))%0A      return %22application/x-font-woff%22;
 %0A%0A    in

support .woff mime type