#2157: context dispatcher failing at mimetypes module depending on the platform.
--------------------------+-------------------------------------------------
Reporter: jorge.vargas | Owner: faide
Type: defect | Status: new
Priority: highest | Milestone: 2.0b4
Component: TurboGears | Version: trunk
Severity: major | Keywords:
--------------------------+-------------------------------------------------
We'll provide a better explanation soon.
after much debugging of catwalk2/tgext.admin, we came to a bug in the
context dispatcher which propagates to the stdlib mimetypes module.
The following command will show you the bug.
{{{
python -c "import mimetypes; print mimetypes.guess_type('.json')[0]"
}}}
SO far we have reports that macos 10.5 returns "application/json", windows
and linux (ubuntu,red hat,etc) return None
habnabit from #python, indicates that mimetypes.knownfiles is the culpid,
as it makes the "guessing" platform dependent.
There is a webhelper for this
[http://turbogears.org/2.0/docs/modules/thirdparty/webhelpers.html?highlight=mimetype#webhelpers.mimehelper.MIMETypes.mimetype
extending mimetypes]
A workaround was commited in r6148 this will allow us to release b4, but
we need a better solution.
--
Ticket URL: <http://trac.turbogears.org/ticket/2157>
TurboGears <http://www.turbogears.org/>
TurboGears front-to-back web development
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "TurboGears Tickets" group.
This group is read-only. No posting by normal members allowed.
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/turbogears-tickets?hl=en?hl=en
-~----------~----~----~----~------~----~------~--~---