Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions src/fuzzfetch/download.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,25 @@
from typing import TYPE_CHECKING

from requests import Response, Session
from requests.adapters import HTTPAdapter
from requests.exceptions import RequestException
from urllib3 import Retry

from .errors import FetcherException

if TYPE_CHECKING:
from .path import PathArg

HTTP_ADAPTER = HTTPAdapter(
max_retries=Retry(
total=3,
backoff_factor=1,
status_forcelist=[500, 502, 503, 504],
)
)
HTTP_SESSION = Session()
HTTP_SESSION.mount("https://", HTTP_ADAPTER)

LOG = getLogger("fuzzfetch")


Expand Down