summaryrefslogtreecommitdiff
path: root/paste/recursive.py
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@gmail.com>2015-04-22 02:33:32 +0200
committerVictor Stinner <victor.stinner@gmail.com>2015-04-22 02:33:32 +0200
commit3026086c19b45382d5ceca778a5458233b485ce9 (patch)
treea58fb49cd65f9b7ff24029aeb4dfaccd657128dd /paste/recursive.py
parent3e25cb1adbf0dce96f49a270d07028550b15e33c (diff)
parentb9ceb0a57e2c48f95e94693da5f3f4b86fbc3bff (diff)
downloadpaste-3026086c19b45382d5ceca778a5458233b485ce9.tar.gz
Merged in mfrobben/paste (pull request #21)
Fix bad reference to iterator variable
Diffstat (limited to 'paste/recursive.py')
-rw-r--r--paste/recursive.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/paste/recursive.py b/paste/recursive.py
index 8f28fc3..0bef920 100644
--- a/paste/recursive.py
+++ b/paste/recursive.py
@@ -115,10 +115,10 @@ class ForwardRequestException(Exception):
def app(environ, start_response):
if environ['PATH_INFO'] == '/hello':
start_response("200 OK", [('Content-type', 'text/plain')])
- return ['Hello World!']
+ return [b'Hello World!']
elif environ['PATH_INFO'] == '/error':
start_response("404 Not Found", [('Content-type', 'text/plain')])
- return ['Page not found']
+ return [b'Page not found']
else:
raise ForwardRequestException('/error')
@@ -158,10 +158,10 @@ class ForwardRequestException(Exception):
def app(environ, start_response):
if environ['PATH_INFO'] == '/hello':
start_response("200 OK", [('Content-type', 'text/plain')])
- return ['Hello World!']
+ return [b'Hello World!']
elif environ['PATH_INFO'] == '/error':
start_response("404 Not Found", [('Content-type', 'text/plain')])
- return ['Page not found']
+ return [b'Page not found']
else:
def factory(app):
return StatusKeeper(app, status='404 Not Found', url='/error')