cloudooo

cloudooo

XML-RPC document conversion server

  • Jérome Perrin's avatar
    manager/getAllowedExtensionList: use explicit extensions in ERP5 legacy mode · be6c35c0
    Jérome Perrin authored
    In python2, mimetypes module was not deterministic and this snippet:
    
        import mimetypes; print(mimetypes.guess_extension("text/html"))
    
    use to be ".html" on python 2.7.14, but is ".htm" on python 2.7.18
    
    Similarly:
    
        import mimetypes; print(mimetypes.guess_extension("application/msword"))
    
    was ".doc" on 2.7.14 and ".dot" on 2.7.18 (this was in my observations, this
    does not look deterministic as it is iterating on a dict, maybe this behaviour
    is not always same)
    
    For html conversion engine, ERP5 expect that the extension for text/html is
    .html, not .htm. Some tests also expect that the conversion for word is .doc so
    to keep compatibility with extensions used in ERP5 compatibility mode, define
    explicitly these two extensions instead of depending on python standard library.
    be6c35c0
Name
Last commit
Last update
cloudooo Loading commit data...
.gitignore Loading commit data...
CHANGELOG.rst Loading commit data...
COPYING Loading commit data...
MANIFEST.in Loading commit data...
NEWS Loading commit data...
README.rst Loading commit data...
setup.py Loading commit data...