For example to upload UTF-8 encoded html file use:
--mime-type="text/html; charset=utf-8"
... | ... |
@@ -1419,7 +1419,7 @@ def format_commands(progname, commands_list): |
1419 | 1419 |
|
1420 | 1420 |
class OptionMimeType(Option): |
1421 | 1421 |
def check_mimetype(option, opt, value): |
1422 |
- if re.compile("^[a-z0-9]+/[a-z0-9+\.-]+$", re.IGNORECASE).match(value): |
|
1422 |
+ if re.compile("^[a-z0-9]+/[a-z0-9+\.-]+(;.*)?$", re.IGNORECASE).match(value): |
|
1423 | 1423 |
return value |
1424 | 1424 |
raise OptionValueError("option %s: invalid MIME-Type format: %r" % (opt, value)) |
1425 | 1425 |
|