Yield (header, value) tuples, skipping headers that are not allowed with the current response status code.
(self)
| 1299 | self._headers.setdefault(_hkey(name), []).append(str(value)) |
| 1300 | |
| 1301 | def iter_headers(self): |
| 1302 | ''' Yield (header, value) tuples, skipping headers that are not |
| 1303 | allowed with the current response status code. ''' |
| 1304 | headers = self._headers.iteritems() |
| 1305 | bad_headers = self.bad_headers.get(self.status_code) |
| 1306 | if bad_headers: |
| 1307 | headers = [h for h in headers if h[0] not in bad_headers] |
| 1308 | for name, values in headers: |
| 1309 | for value in values: |
| 1310 | yield name, value |
| 1311 | if self._cookies: |
| 1312 | for c in self._cookies.values(): |
| 1313 | yield 'Set-Cookie', c.OutputString() |
| 1314 | |
| 1315 | def wsgiheader(self): |
| 1316 | depr('The wsgiheader method is deprecated. See headerlist.') #0.10 |
no test coverage detected