Closed 294355e8-e81f-4a27-bb34-b214ef7e2690 closed 23 years ago
added some additional mapping for mimetypes.py.
Andreas
Logged In: YES user_id=21627
I believe some of these types are not "official", in the sense that they are supported by an RFC; types that are not defined in an RFC MUST use the x- prefix. E.g. in what RFC is "text/xsl" or "text/xul" defined?
IOW, only types listed in http://www.isi.edu/in-notes/iana/assignments/media-types/ should be supported without x-prefix.
Could you please review the entire list of known types with this respect, and update the patch accordingly?
Logged In: YES user_id=6380
Still waiting for feedback...
Logged In: YES user_id=11084
The x-* mimetypes are common used although they might not be officially assigned. I would not remove these from the list. This patch also relates to bug bpo-439710 for better support of user-defined mime-types.
Andreas
Logged In: YES user_id=21627
I wasn't complaining about the x- types (application/x-javascript); they are fine. I was complaining about using unregistered types without an x- prefix, specifically
+ '.xsl': 'text/xsl', + '.xul': 'text/xul'
These are not valid MIME types, unless I'm missing something.
More generally, I was requesting that the IANA registry is analysed and this patch is brought in sync with it.
Logged In: YES user_id=11084
the mimetypes for .xsl and xul are also in common usage.
Andreas
Logged In: YES user_id=21627
Just that Microsoft uses them should not cause us to violate internet standards. RFC 2045 specifies that the syntax of a subtype is
subtype := extension-token / iana-token iana-token := \<A publicly-defined extension token. Tokens of this form must be registered with IANA as specified in RFC 2048.> x-token := \<The two characters "X-" or "x-" followed, with no intervening white space, by any token>
Since text/xsl and text/xul are not registered as specified in RFC 2048, they are not valid types.
So our choice is to either follow Microsoft, or follow the Internet Standards. If the inclusion of text/xsl in the patch was intentional (rather than a mistake), I recommend to reject this patch.
Logged In: YES user_id=21627
I've now applied this patch as mimetypes.py 1.19, removing all the types that were not registered.
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields: ```python assignee = 'https://github.com/loewis' closed_at =
created_at =
labels = ['library']
title = 'additional mappings for mimetypes.py'
updated_at =
user = 'https://github.com/zopyx'
```
bugs.python.org fields:
```python
activity =
actor = 'loewis'
assignee = 'loewis'
closed = True
closed_date = None
closer = None
components = ['Library (Lib)']
creation =
creator = 'ajung'
dependencies = []
files = ['3406']
hgrepos = []
issue_num = 438790
keywords = ['patch']
message_count = 8.0
messages = ['36904', '36905', '36906', '36907', '36908', '36909', '36910', '36911']
nosy_count = 3.0
nosy_names = ['gvanrossum', 'loewis', 'ajung']
pr_nums = []
priority = 'low'
resolution = 'accepted'
stage = None
status = 'closed'
superseder = None
type = None
url = 'https://bugs.python.org/issue438790'
versions = []
```