| 167 | def test_content_length_0(self): |
| 168 | |
| 169 | class ContentLengthChecker(list): |
| 170 | def __init__(self): |
| 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 '') |
no outgoing calls
searching dependent graphs…