Skip to content

Commit

Permalink
Merge pull request #986 from yorickvP/yorickvp/mitm-stream
Browse files Browse the repository at this point in the history
filter-pypi-responses: stream package requests that hit the proxy
  • Loading branch information
phaer authored Jun 15, 2024
2 parents 1f57898 + 318a87f commit 8235c8b
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions pkgs/fetchPipMetadata/filter-pypi-responses.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,11 @@ def get_files_to_hide(pname, max_ts):
"""


def responseheaders(flow: http.HTTPFlow) -> None:
if "/simple/" not in flow.request.url:
flow.response.stream = True


def response(flow: http.HTTPFlow) -> None:
if not "/simple/" in flow.request.url:
return
Expand Down

0 comments on commit 8235c8b

Please sign in to comment.