Skip to content

Commit

Permalink
Revert filename guessing changes (GEOS-5366)
Browse files Browse the repository at this point in the history
  • Loading branch information
David Winslow committed Oct 25, 2012
1 parent c60c35c commit c3e3b64
Showing 1 changed file with 1 addition and 10 deletions.
11 changes: 1 addition & 10 deletions src/ows/src/main/java/org/geoserver/ows/Response.java
Expand Up @@ -210,16 +210,7 @@ public String getAttachmentFileName(Object value, Operation operation) {
name = name + "-" + opName;
}
String[] typeParts = mimeType.split(";");
String[] typeAndSubtype = typeParts[0].split("/");
if (typeAndSubtype.length == 2) {
String extension = typeAndSubtype[1].split("[^\\p{Alnum}]")[0];
name = name + "." + extension;
} else {
final String message =
"Cannot guess file extension for invalid MIME type: '" +
mimeType + "'";
throw new IllegalStateException(message);
}
name = name + "." + typeParts[0].split("/")[0];
}
return name;
}
Expand Down

0 comments on commit c3e3b64

Please sign in to comment.