Merge pull request #986 from yorickvP/yorickvp/mitm-stream

filter-pypi-responses: stream package requests that hit the proxy
This commit is contained in:
Paul Haerle 2024-06-15 10:13:17 +02:00 committed by GitHub
commit 8235c8b5b9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -85,6 +85,11 @@ Response format:
""" """
def responseheaders(flow: http.HTTPFlow) -> None:
if "/simple/" not in flow.request.url:
flow.response.stream = True
def response(flow: http.HTTPFlow) -> None: def response(flow: http.HTTPFlow) -> None:
if not "/simple/" in flow.request.url: if not "/simple/" in flow.request.url:
return return