NuGet/Home

Make Downloadtimeout configurable

Open

#14,609 建立於 2025年10月22日

在 GitHub 查看
 (1 留言) (7 反應) (0 負責人)HTML (1,459 star) (292 fork)batch import
Area:ProtocolFunctionality:SDKPriority:3Type:Featurehelp wanted

描述

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

貢獻者指南