Warning: Can't synchronize with repository "(default)" (Unsupported version control system "svn": No module named svn). Look in the Trac log for more information.

Ticket #2157 (closed defect: fixed)

Opened 10 years ago

Last modified 10 years ago

context dispatcher failing at mimetypes module depending on the platform.

Reported by: jorge.vargas Owned by: faide
Priority: highest Milestone: 2.0b4
Component: TurboGears Version: trunk
Severity: major Keywords:
Cc:

Description

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  extending mimetypes

A workaround was commited in r6148 this will allow us to release b4, but we need a better solution.

Change History

comment:1 Changed 10 years ago by jorge.vargas

  • Status changed from new to closed
  • Resolution set to fixed
  • Milestone changed from 2.0b5 to 2.0b4

The new implementation was implemented, tested and released in tg2b4, thanks for the work chris

Note: See TracTickets for help on using tickets.