https://github.com/jdcasey/mimeparse
Fork of http://code.google.com/p/mimeparse/
https://github.com/jdcasey/mimeparse
Last synced: about 1 year ago
JSON representation
Fork of http://code.google.com/p/mimeparse/
- Host: GitHub
- URL: https://github.com/jdcasey/mimeparse
- Owner: jdcasey
- License: mit
- Created: 2013-05-21T04:57:55.000Z (about 13 years ago)
- Default Branch: master
- Last Pushed: 2013-05-21T05:15:43.000Z (about 13 years ago)
- Last Synced: 2025-06-28T02:05:59.739Z (about 1 year ago)
- Language: Java
- Size: 207 KB
- Stars: 5
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README
- License: LICENSE
Awesome Lists containing this project
README
This module provides basic functions for parsing mime-type names and matching them against a list of media-ranges.
See section 14.1 of RFC 2616 (the HTTP specification) for a complete explanation.
Testing
=======
The format of the JSON test data file is as follows:
A top-level JSON object which has a key for each of the functions to be tested. The value corresponding to that key is a list of tests. Each test contains: the argument or arguments to the function being tested, the expected results and an optional description.
Python
======
The Python tests require either Python 2.6 or the installation of the SimpleJSON library.
Installing SimpleJson can be done by:
sudo easy_install simplejson
Run the tests by typing:
python mimeparse_test.py