1. Bilal Akhtar
  2. moin-2.0-gci


Thomas Waldmann  committed a4db041

fixes mimetypes read from registry issue on windows, thanks to Nick Rioux

  • Participants
  • Parent commits ed265a8
  • Branches default

Comments (0)

Files changed (2)

File MoinMoin/util/_tests/test_mimetype.py

View file
  • Ignore whitespace
         ('.pdf',             'application/pdf'),
         ('.txt',             'text/plain'),
         ('.jpeg',            'image/jpeg'),
+        ('.png',             'image/png'),
+        ('.svg',             'image/svg+xml'),
         ('',                 'application/octet-stream')

File MoinMoin/util/mimetype.py

View file
  • Ignore whitespace
 from MoinMoin import config
+# prevents unexpected results on Windows
+# see http://bugs.python.org/issue10551
  # OpenOffice 2.x & other open document stuff
  '.rst': 'text/x-rst',
  '.flv': 'video/x-flv',
  '.wmv': 'video/x-ms-wmv',
+ '.wma': 'audio/x-ms-wma',
  '.swf': 'application/x-shockwave-flash',
  '.awd': 'application/x-anywikidraw',
  '.twd': 'application/x-twikidraw',
  '.moin': 'text/x.moin.wiki',
  '.creole': 'text/x.moin.creole',
  '.mediawiki': 'text/x-mediawiki',
+ '.ico': 'image/x-icon',
+ '.svg': 'image/svg+xml'
 # add all mimetype patterns of pygments