NuGet/Home

Make Downloadtimeout configurable

Open

#14 609 ouverte le 22 oct. 2025

Voir sur GitHub
 (1 commentaire) (7 réactions) (0 assignés)HTML (292 forks)batch import
Area:ProtocolFunctionality:SDKPriority:3Type:Featurehelp wanted

Métriques du dépôt

Stars
 (1 459 stars)
Métriques de merge PR
 (Merge moyen 464j 23h) (1 PR mergée en 30 j)

Description

NuGet Product(s) Involved

NuGet SDK

The Elevator Pitch

The current implementation of HttpRetryHandlerRequest in NuGet.Protocol defines a hard-coded download timeout: https://github.com/NuGet/NuGet.Client/blob/dev/src/NuGet.Core/NuGet.Protocol/HttpSource/HttpRetryHandlerRequest.cs#L17

private static readonly TimeSpan DefaultDownloadTimeout = TimeSpan.FromSeconds(60);

This fixed timeout value cannot be configured externally, which creates significant issues in real-world environments, particularly where network traffic is monitored or filtered by security tools such as Zscaler with deep packet inspection.

These systems may delay or pause downloads for security scanning or traffic shaping purposes. In such cases, NuGet operations can incorrectly timeout after 60 seconds, even though the download is still progressing or could resume shortly. This leads to failed restores or install processes, especially for:

  • CI/CD pipelines operating behind corporate firewalls
  • Developers behind VPNs or secure proxies
  • Environments with intermittent or low-bandwidth connections
  • Large packages that take longer to download

NuGet’s current behavior does not allow developers or teams to adapt the timeout to match their environment's needs.

Additional Context and Details

No response

Guide contributeur