| 340 | return self._is_disconnected |
| 341 | |
| 342 | async def send_push_promise(self, path: str) -> None: |
| 343 | if class="st">"http.response.push" in self.scope.get(class="st">"extensions", {}): |
| 344 | raw_headers: list[tuple[bytes, bytes]] = [] |
| 345 | for name in SERVER_PUSH_HEADERS_TO_COPY: |
| 346 | for value in self.headers.getlist(name): |
| 347 | raw_headers.append((name.encode(class="st">"latin-1"), value.encode(class="st">"latin-1"))) |
| 348 | await self._send({class="st">"type": class="st">"http.response.push", class="st">"path": path, class="st">"headers": raw_headers}) |