Skip to content

Commit

Permalink
Issue #1658: recognize that mimetype subtypes can contain dashes
Browse files Browse the repository at this point in the history
  • Loading branch information
pieter-edelman-nictiz committed Jun 20, 2024
1 parent c631f6c commit 1459c77
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -3552,7 +3552,7 @@ private String checkValidUrl(String value) {
}

private String checkValidMimeType(String mt) {
if (!mt.matches("^(\\w+|\\*)\\/(\\w+|\\*)((;\\s*(\\w+)=\\s*(\\S+))?)$")) {
if (!mt.matches("^(\\w+|\\*)\\/([\\w-]+|\\*)((;\\s*(\\w+)=\\s*(\\S+))?)$")) {
return "Mime type invalid";
}
return null;
Expand Down

0 comments on commit 1459c77

Please sign in to comment.