diff options
| -rw-r--r-- | docs/news.txt | 4 | ||||
| -rw-r--r-- | paste/fixture.py | 2 |
2 files changed, 6 insertions, 0 deletions
diff --git a/docs/news.txt b/docs/news.txt index 805c334..768899e 100644 --- a/docs/news.txt +++ b/docs/news.txt @@ -9,6 +9,10 @@ svn trunk * ``paste.httpheaders.CONTENT_RANGE`` returns ``bytes START-END/LENGTH`` instead of just ``START-END/LENGTH`` +* In ``paste.fixture.TestApp`` set ``CONTENT_TYPE`` to + ``'application/x-www-form-urlencoded'`` whenever there are + parameters (and no other content type was provided). + 1.4.2 ----- 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: |
