(self, scope: Scope, receive: Receive, send: Send)
| 15 | self.compresslevel = compresslevel |
| 16 | |
| 17 | async def __call__(self, scope: Scope, receive: Receive, send: Send) -> None: |
| 18 | if scope[class="st">"type"] != class="st">"http": class="cm"># pragma: no cover |
| 19 | await self.app(scope, receive, send) |
| 20 | return |
| 21 | |
| 22 | headers = Headers(scope=scope) |
| 23 | responder: ASGIApp |
| 24 | if class="st">"gzip" in headers.get(class="st">"Accept-Encoding", class="st">""): |
| 25 | responder = GZipResponder(self.app, self.minimum_size, compresslevel=self.compresslevel) |
| 26 | else: |
| 27 | responder = IdentityResponder(self.app, self.minimum_size) |
| 28 | |
| 29 | await responder(scope, receive, send) |
| 30 | |
| 31 | |
| 32 | class IdentityResponder: |
nothing calls this directly
no test coverage detected