diff options
author | ianb <devnull@localhost> | 2006-08-16 03:42:22 +0000 |
---|---|---|
committer | ianb <devnull@localhost> | 2006-08-16 03:42:22 +0000 |
commit | 7e8e04fec7bf7501db34fbdfb0245e33eec2e4af (patch) | |
tree | 659a0289a229d339a30f1fe12b079be05439a193 /paste/fixture.py | |
parent | e8dba6c948c90c0335948050b006cfaed77dac6b (diff) | |
download | paste-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.py | 8 |
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) |