codahale/dropwizard — pull request #183 by Omega359 (2012-10-05 13:13:03+00:00)
Title: Fixed issue with missing directories in assets broadcasting jar file path info.

Currently in 0.5.1 & snapshot the asset servlet can leak file path info under certain circumstances. The one I've seen is where I have an assets bundle defined as

CacheBuilderSpec cacheSpec = AssetsBundle.DEFAULT_CACHE_SPEC;
addBundle(new AssetsBundle("/apidocs/", cacheSpec, "/"));

Hitting the url http://127.0.0.1:8080/services/hello-world will result in a 500 error with the following message:

java.lang.AssertionError: java.io.FileNotFoundException: JAR entry apidocs/services/hello-world not found in I:\development\dropTest\target\droptest-0.1-SNAPSHOT.jar

This patch fixes that to correctly return a 404.