Skip to content

Commit

Permalink
Changed type evaluation to use 'binary' for GWT specific files.
Browse files Browse the repository at this point in the history
  • Loading branch information
tHerrmann committed Jan 29, 2014
1 parent 97195b6 commit 73d8efd
Showing 1 changed file with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -349,7 +349,13 @@ private String getType(String destination) {
if (destination.endsWith(".jpg") || destination.endsWith(".gif") || destination.endsWith(".png")) {
return "image";
}
if (destination.endsWith(".jar") || destination.endsWith(".class")) {
// use binary type for GWT specific files (*.cache.html, hosted.html, *.nocache.js, *.rpc) to avoid their content being indexed or editable
if (destination.endsWith(".jar")
|| destination.endsWith(".class")
|| destination.endsWith(".cache.html")
|| destination.endsWith("hosted.html")
|| destination.endsWith(".nocache.js")
|| destination.endsWith(".rpc")) {
return "binary";
}
if (destination.endsWith(".jsp")) {
Expand All @@ -362,7 +368,6 @@ private String getType(String destination) {
|| destination.endsWith(".html")
|| destination.endsWith(".js")
|| destination.endsWith(".xml")
|| destination.endsWith(".rpc")
|| destination.endsWith(".css")) {
return "plain";
}
Expand Down

0 comments on commit 73d8efd

Please sign in to comment.