diff options
author | Christoph Zwerschke <cito@online.de> | 2010-08-19 18:22:46 +0200 |
---|---|---|
committer | Christoph Zwerschke <cito@online.de> | 2010-08-19 18:22:46 +0200 |
commit | a5a05c6ed6710823879e3443e5c74886ddbc8a4f (patch) | |
tree | fc796a1f419b8d3386addda71971949e41973f8d /paste/util | |
parent | 7a2cde4d6e1f19088652f5048662ce3e84e7a454 (diff) | |
download | paste-a5a05c6ed6710823879e3443e5c74886ddbc8a4f.tar.gz |
Added some more test cases to test_mimeparse that I have found here:
http://code.google.com/p/mimeparse/source/browse/trunk/testdata.json
Also added a link to the project upstream.
Diffstat (limited to 'paste/util')
-rw-r--r-- | paste/util/mimeparse.py | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/paste/util/mimeparse.py b/paste/util/mimeparse.py index 238fcdc..01dbe80 100644 --- a/paste/util/mimeparse.py +++ b/paste/util/mimeparse.py @@ -6,18 +6,20 @@ the HTTP specification [RFC 2616] for a complete explanation. http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.1 +Based on mime_parse 0.1.2 by Joe Gregorio + + http://code.google.com/p/mimeparse/ + Contents: - parse_mime_type(): Parses a mime-type into its component parts. - parse_media_range(): Media-ranges are mime-types with wild-cards and a 'q' quality parameter. - quality(): Determines the quality ('q') of a mime-type when compared against a list of media-ranges. - quality_parsed(): Just like quality() except the second parameter must be pre-parsed. - best_match(): Choose the mime-type with the highest quality ('q') from a list of candidates. + - desired_matches(): Filter against a list of desired mime-types in the order the server prefers. + """ -__version__ = "0.1.2" -__author__ = 'Joe Gregorio' -__email__ = "joe@bitworking.org" -__credits__ = "" def parse_mime_type(mime_type): """Carves up a mime-type and returns a tuple of the |