summaryrefslogtreecommitdiff
path: root/paste/fixture.py
diff options
context:
space:
mode:
authorianb <devnull@localhost>2007-09-15 17:28:54 +0000
committerianb <devnull@localhost>2007-09-15 17:28:54 +0000
commitcaf3a1837e938a23967d3927cb549400fb008ef4 (patch)
treeaba3e8a7b0c424bcf57663444b219d50359ab6d3 /paste/fixture.py
parentf5fa5a259ea1c8489558d7d181966d0ae2d3252e (diff)
downloadpaste-caf3a1837e938a23967d3927cb549400fb008ef4.tar.gz
set CONTENT_TYPE on non-file uploads too
Diffstat (limited to 'paste/fixture.py')
-rw-r--r--paste/fixture.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/paste/fixture.py b/paste/fixture.py
index 6633cf4..d1f3a5a 100644
--- a/paste/fixture.py
+++ b/paste/fixture.py
@@ -226,6 +226,8 @@ class TestApp(object):
content_type, params = self.encode_multipart(
params, upload_files)
environ['CONTENT_TYPE'] = content_type
+ elif params:
+ environ.setdefault('CONTENT_TYPE', 'application/x-www-form-urlencoded')
if '?' in url:
url, environ['QUERY_STRING'] = url.split('?', 1)
else: