summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CHANGELOG3
-rw-r--r--routes/util.py2
2 files changed, 5 insertions, 0 deletions
diff --git a/CHANGELOG b/CHANGELOG
index 5893df8..2af2d1d 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -2,6 +2,9 @@ Routes Changelog
========================
-- 1.7.1 (**tip**)
+* Fixed bug with sub-domains from route defaults getting encoded to unicode
+ resulting in a unicode route which then caused url_for to throw an
+ exception.
* Removed duplicate assignment in map.resource. Patch by Mike Naberezny.
* Applied test patch fix for path checking. Thanks Mike Naberezny.
* Added additional checking of remaining URL, to properly swallow periods in
diff --git a/routes/util.py b/routes/util.py
index 82d35c3..365e974 100644
--- a/routes/util.py
+++ b/routes/util.py
@@ -54,6 +54,8 @@ def _subdomain_check(config, kargs):
on the current subdomain or lack therof."""
if config.mapper.sub_domains:
subdomain = kargs.pop('sub_domain', None)
+ if isinstance(subdomain, unicode):
+ subdomain = str(subdomain)
fullhost = config.environ.get('HTTP_HOST') or \
config.environ.get('SERVER_NAME')
hostmatch = fullhost.split(':')