Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Verify MIME validity in resources ($20) #34

campadrenalin opened this issue Mar 31, 2013 · 1 comment


None yet
1 participant
Copy link

commented Mar 31, 2013

Using the mimetypes Python module, add a check in the Resource class's type setter, to only allow valid MIME types (and "direct/json") as resource types. All normal MIME type resources have their content represented as strings, "direct/json" is for JSON-serializable content, such as dict objects. Don't worry about being strict about making sure the content is valid for the resource type - we'll do that in a separate issue.


This comment has been minimized.

Copy link
Owner Author

commented Mar 31, 2013

Bounty is $50.

(Copied from acceptance criteria)

Use mimetypes.types_map.values() as the basis for verifying valid resource types, as well as a list of “special exceptions” we have to guarantee will work - unique ones such as “direct/json”, and merely obscure ones such as “text/lua”.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.