• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

frappe / frappe / 18034
56%

Build:
DEFAULT BRANCH: develop
Ran 02 Oct 2018 10:14AM UTC
Jobs 3
Files 937
Run time 2min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

pending completion
18034

push

travis-ci

rmehta
Pass Werkzeug/WSGI middleware bytestrings, not unicode. (#6180)

* 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).

17569 of 38651 relevant lines covered (45.46%)

1.35 hits per line

Jobs
ID Job ID Ran Files Coverage
1 18034.1 (DB=mariadb) 02 Oct 2018 10:14AM UTC 0
44.99
Travis Job 18034.1
2 18034.2 (DB=mariadb) 02 Oct 2018 10:16AM UTC 0
45.01
Travis Job 18034.2
3 18034.3 (DB=postgres) 02 Oct 2018 10:16AM UTC 0
45.02
Travis Job 18034.3
Source Files on build 18034
Detailed source file information is not available for this build.
  • Back to Repo
  • Travis Build #18034
  • 0031ca5d on github
  • Prev Build on develop (#18024)
  • Next Build on develop (#18046)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc