summaryrefslogtreecommitdiff
path: root/webtest/debugapp.py
diff options
context:
space:
mode:
authorGael Pasgrimaud <gael@gawel.org>2011-08-20 18:18:07 +0200
committerGael Pasgrimaud <gael@gawel.org>2011-08-20 18:18:07 +0200
commite7f314f1dbc1e13ef76c9c8fa48d2c71f3754b6b (patch)
tree4b63cfa8308daa1a0a71cd035326bd1e92de34a3 /webtest/debugapp.py
parent53889b57fe16c57fd7f532953d2e15bfaba7e5b3 (diff)
downloadwebtest-e7f314f1dbc1e13ef76c9c8fa48d2c71f3754b6b.tar.gz
fix bug with latest webob version: can't read body without content_length
Diffstat (limited to 'webtest/debugapp.py')
-rw-r--r--webtest/debugapp.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/webtest/debugapp.py b/webtest/debugapp.py
index ea989a9..abc119d 100644
--- a/webtest/debugapp.py
+++ b/webtest/debugapp.py
@@ -27,7 +27,10 @@ def debug_app(environ, start_response):
value = repr(value)
parts.append('%s: %s\n' % (name, value))
- req_body = req.body
+ if req.content_length:
+ req_body = req.body
+ else:
+ req_body = ''
if req_body:
parts.append('-- Body ----------\n')
parts.append(req_body)