No description
* Pass Werkzeug/WSGI middleware bytestrings, not unicode.
This fixes a bug that prevents website routing to non-ascii routes, such as
will be automatically created by items with non-ascii characters in their
names.
Werkzeug/WSGI actually does careful decoding of URLs passed to it which
ensure they are in the correct format internally. However, using a non-ascii
URL was causing a unicode error and exceptions.
In app.py, unicode_literals is in effect. SharedDataMiddleware and
StaticDataMiddleware instances are created to deal with files in 'assets'
and 'files', respectively. The paths passed need to be bytestrings; however,
due to the use of unicode, these were passed as unicode. This was causing a
later exception when using a (unicode) string method on the decoded URL
string. By explicitly passing bytestrings, this is avoided and everything
works as expected.
* Instead of calling str, call .encode('ascii') method for compatibility with Python3.
* Unicode URL WSGI fix: After testing, it is actually the key not the value of
the export that matters, however both can be wrapped in str() to get 'bytes'
in Python 2 and unicode in Python 3 (which WSGI seems to expect).
|
||
|---|---|---|
| .github | ||
| .travis | ||
| ci | ||
| frappe | ||
| rollup | ||
| test_sites | ||
| .eslintignore | ||
| .eslintrc | ||
| .gitignore | ||
| .travis.yml | ||
| attributions.md | ||
| bandit.yml | ||
| CODE_OF_CONDUCT.md | ||
| hooks.md | ||
| LICENSE | ||
| Makefile | ||
| MANIFEST.in | ||
| node_utils.js | ||
| package.json | ||
| README.md | ||
| requirements.txt | ||
| setup.py | ||
| socketio.js | ||
| yarn.lock | ||
Full-stack web application framework that uses Python and MariaDB on the server side and a tightly integrated client side library. Built for ERPNext
Table of Contents
Installation
Contributing
Website
For details and documentation, see the website https://frappe.io
License
This repository has been released under the MIT License.