dcramer/raven — Issue #51: AttributeError in 'raven.utils.wsgi.get_headers'
Author: yorkedork
Created: 2012-01-31 20:59:05+00:00
State: open

Unless I've done something odd, it appears that 'get_headers' can't cope with a key that is not a string (more specifically, something that doesn't support '.startswith'). It appears django-reversion puts a strange beast in ENVIRON.

```python
AttributeError: 'tuple' object has no attribute 'startswith'

...

File "raven/utils/wsgi.py", line 17, in get_headers
if key.startswith('HTTP_') and key not in \
```

A snippet of my ENVIRON containing the trouble AFAICT:

```
{"('reversion.revision_middleware_active', )": True,
'CC': 'clang',
'CELERY_LOADER': 'djcelery.loaders.DjangoLoader',
'COLORTERM': 'gnome-terminal',
'COMPIZ_CONFIG_PROFILE': 'ubuntu',
'CONTENT_LENGTH': '',
'CONTENT_TYPE': 'text/plain',
```