Mercurial > piecrust2
diff piecrust/serving/util.py @ 771:673979a5d548
internal: Don't strip the trailing slash when we get the root URL exactly.
Before we were treating `/` as a special case, when the special case is *any*
root URL -- not just `/`.
author | Ludovic Chabant <ludovic@chabant.com> |
---|---|
date | Sun, 03 Jul 2016 07:53:17 -0700 |
parents | dfd9f5ee4622 |
children | 4850f8c21b6e |
line wrap: on
line diff
--- a/piecrust/serving/util.py Sat Jul 02 01:30:51 2016 -0700 +++ b/piecrust/serving/util.py Sun Jul 03 07:53:17 2016 -0700 @@ -49,7 +49,8 @@ def get_requested_page(app, req_path): # Remove the trailing slash to simplify how we parse URLs. - if req_path != '/': + root_url = app.config.get('site/root') + if req_path != root_url: req_path = req_path.rstrip('/') # Try to find what matches the requested URL.