Pylons/webob — Issue #34: headers.clear() breaks headers in Response
Author: jamur2
Created: 2012-03-02 22:15:49+00:00
State: open

If you call `resp.headers.clear()` on a Response object, `resp.headers` and `resp.headerlist` get out of sync.

Example:

```python
>>> import webob
>>> resp = webob.Response()
>>> resp.headers
ResponseHeaders([('Content-Type', 'text/html; charset=UTF-8'), ('Content-Length', '0')])
>>> resp.headerlist
[('Content-Type', 'text/html; charset=UTF-8'), ('Content-Length', '0')]
>>> resp.headers.clear()
>>> resp.headerlist
[('Content-Type', 'text/html; charset=UTF-8'), ('Content-Length', '0')]
>>> resp.headers
ResponseHeaders([])
```