The value of Content-Length HTTP header.
(self, _CONTENT_LENGTH=hdrs.CONTENT_LENGTH)
| 69 | |
| 70 | @property |
| 71 | def content_length(self, _CONTENT_LENGTH=hdrs.CONTENT_LENGTH): |
| 72 | """The value of Content-Length HTTP header.""" |
| 73 | l = self.headers.get(_CONTENT_LENGTH) |
| 74 | if l is None: |
| 75 | return None |
| 76 | else: |
| 77 | return int(l) |
| 78 | |
| 79 | FileField = collections.namedtuple('Field', 'name filename file content_type') |
| 80 |