(self, f: flow.Flow)
| 194 | self.inflight = None |
| 195 | |
| 196 | def check(self, f: flow.Flow) -> str | None: |
| 197 | if f.live or f == self.inflight: |
| 198 | return "Can't replay live flow." |
| 199 | if f.intercepted: |
| 200 | return "Can't replay intercepted flow." |
| 201 | if isinstance(f, http.HTTPFlow): |
| 202 | if not f.request: |
| 203 | return "Can't replay flow with missing request." |
| 204 | if f.request.raw_content is None: |
| 205 | return "Can't replay flow with missing content." |
| 206 | if f.websocket is not None: |
| 207 | return "Can't replay WebSocket flows." |
| 208 | else: |
| 209 | return "Can only replay HTTP flows." |
| 210 | return None |
| 211 | |
| 212 | def load(self, loader): |
| 213 | loader.add_option( |
no outgoing calls