summaryrefslogtreecommitdiff
path: root/paste/fixture.py
diff options
context:
space:
mode:
authorianb <devnull@localhost>2006-08-16 03:42:22 +0000
committerianb <devnull@localhost>2006-08-16 03:42:22 +0000
commit7e8e04fec7bf7501db34fbdfb0245e33eec2e4af (patch)
tree659a0289a229d339a30f1fe12b079be05439a193 /paste/fixture.py
parente8dba6c948c90c0335948050b006cfaed77dac6b (diff)
downloadpaste-7e8e04fec7bf7501db34fbdfb0245e33eec2e4af.tar.gz
The headers variable left out the special case for content_type and content_length
Diffstat (limited to 'paste/fixture.py')
-rw-r--r--paste/fixture.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/paste/fixture.py b/paste/fixture.py
index c1ae1c6..c161c70 100644
--- a/paste/fixture.py
+++ b/paste/fixture.py
@@ -187,7 +187,13 @@ class TestApp(object):
url += params
environ = self._make_environ()
for header, value in headers.items():
- environ['HTTP_%s' % header.replace('-', '_').upper()] = value
+ if header.lower() == 'content-type':
+ var = 'CONTENT_TYPE'
+ elif header.lower() == 'content-length':
+ var = 'CONTENT_LENGTH'
+ else:
+ var = 'HTTP_%s' % header.replace('-', '_').upper()
+ environ[var] = value
url = str(url)
if '?' in url:
url, environ['QUERY_STRING'] = url.split('?', 1)