Read body into a string. Raise HTTPError(413) on requests that are too large.
(self, maxread)
| 1747 | return body |
| 1748 | |
| 1749 | def _get_body_string(self, maxread): |
| 1750 | """ Read body into a string. Raise HTTPError(413) on requests that are |
| 1751 | too large. """ |
| 1752 | if self.content_length > maxread: |
| 1753 | raise HTTPError(413, 'Request entity too large') |
| 1754 | data = self.body.read(maxread + 1) |
| 1755 | if len(data) > maxread: |
| 1756 | raise HTTPError(413, 'Request entity too large') |
| 1757 | return data |
| 1758 | |
| 1759 | @property |
| 1760 | def body(self): |