(self, item)
| 171 | list.__init__(self) |
| 172 | self.content_length = None |
| 173 | def append(self, item): |
| 174 | kv = item.split(b':', 1) |
| 175 | if len(kv) > 1 and kv[0].lower() == b'content-length': |
| 176 | self.content_length = kv[1].strip() |
| 177 | list.append(self, item) |
| 178 | |
| 179 | # Here, we're testing that methods expecting a body get a |
| 180 | # content-length set to zero if the body is empty (either None or '') |