NuGet/Home

Make Downloadtimeout configurable

Open

#14,609 创建于 2025年10月22日

在 GitHub 查看
 (1 评论) (7 反应) (0 负责人)HTML (292 fork)batch import
Area:ProtocolFunctionality:SDKPriority:3Type:Featurehelp wanted

仓库指标

Star
 (1,459 star)
PR 合并指标
 (平均合并 464天 23小时) (30 天内合并 1 个 PR)

描述

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

贡献者指南