From a5a05c6ed6710823879e3443e5c74886ddbc8a4f Mon Sep 17 00:00:00 2001 From: Christoph Zwerschke Date: Thu, 19 Aug 2010 18:22:46 +0200 Subject: 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. --- paste/util/mimeparse.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'paste/util') 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 -- cgit v1.2.1