Process data, fire callbacks synchronously. Args: data: bytes or bytearray of incoming data Raises: ParseError: If the HTTP request is malformed
(self, data)
| 192 | self._chunk_remaining = 0 |
| 193 | |
| 194 | def feed(self, data): |
| 195 | class="st">"""Process data, fire callbacks synchronously. |
| 196 | |
| 197 | Args: |
| 198 | data: bytes or bytearray of incoming data |
| 199 | |
| 200 | Raises: |
| 201 | ParseError: If the HTTP request is malformed |
| 202 | class="st">""" |
| 203 | self._buffer.extend(data) |
| 204 | |
| 205 | while self._buffer: |
| 206 | if self._state == &class="cm">#x27;proxy_protocol': |
| 207 | if not self._parse_proxy_protocol(): |
| 208 | break |
| 209 | elif self._state == &class="cm">#x27;request_line': |
| 210 | if not self._parse_request_line(): |
| 211 | break |
| 212 | elif self._state == &class="cm">#x27;headers': |
| 213 | if not self._parse_headers(): |
| 214 | break |
| 215 | elif self._state == &class="cm">#x27;body': |
| 216 | if not self._parse_body(): |
| 217 | break |
| 218 | elif self._state == &class="cm">#x27;chunked': |
| 219 | if not self._parse_chunked_body(): |
| 220 | break |
| 221 | else: |
| 222 | break |
| 223 | |
| 224 | @property |
| 225 | def proxy_protocol_info(self): |