Save-WebFile: curl download fails in WinPE proxy environment while Invoke-WebRequest works
まだ誰も着手していません。
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 57/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 活発
- 技術スタック
- powershell
- 領域
- backend
調査の方向性
Start with Public\Functions\Save-WebFile.ps1 and trace how Save-WebFile selects the WebClient and curl branches, including the header request and download command. Reproduce the reported failure in WinPE with a proxy, then compare it with the Invoke-WebRequest download that succeeds. Done means the download works through the WinPE proxy with a consistent configuration or a usable option to select the download method.
索引モデルが issue の本文から書いたものです。
説明
Describe the bug
When using Save-WebFile from OSD 26.10.16.1 during the WinPE phase in a proxy environment, the download through curl.exe does not work.
Replacing the curl download command with Invoke-WebRequest allows the download to work in this environment.
The function already uses Invoke-WebRequest to retrieve the HTTP headers in the curl branch, but then uses curl.exe for the actual download. These two clients may use different proxy configurations.
To Reproduce
-
Boot into WinPE in an environment where internet access requires a proxy.
-
Load OSD 26.10.16.1.
-
Run
Save-WebFileto download a file, taking the curl download branch. -
The download through
curl.exefails. -
Replace the
$curlCommandExpressionassignment with:$curlCommandExpression = "iwr -uri `"$SourceUrl`" -outfile `"$DestinationFullName`" -UseBasicParsing" -
Repeat the download. It works using
Invoke-WebRequest.
Expected behavior
Save-WebFile should download files reliably through the proxy available in the WinPE environment.
The HTTP header request and the actual download should use a consistent proxy configuration. Alternatively, the function could provide an option to use Invoke-WebRequest as the download method.
Screenshots
Not available.
Desktop (please complete the following information):
- OS: Windows PE (WinPE), deployment phase
- Browser: Not applicable
- Version: OSD 26.10.16.1
- WinPE build: Not provided
- PowerShell version: Not provided
Smartphone (please complete the following information):
Not applicable.
Additional context
Affected function:
Save-WebFile.ps1, OSD 26.10.16.1
The function selects the WebClient branch when DefaultWebProxy.Address is populated, when -WebClient is specified, or when curl.exe is unavailable. Otherwise, it uses the curl branch.
The exact reason why the proxy configuration is usable by Invoke-WebRequest but not by the curl download still needs investigation.
This issue concerns the download implementation in Save-WebFile, independently of the direct TCP precheck in Test-WebConnection.
- 主要言語
- PowerShell
- スター
- 251
- フォーク
- 102
- 平均マージ
- 2分
- マージ済み PR(30日)
- 4
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
OSDeploy/OSD のほかの issue
-
難易度 1/5 1時間未満 初心者へのやさしさ 68/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 63/100
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
rubys/roundhouse#1917 ·
-
Pretalx reports older version to be the latest release than what is actually installed and availableオープン
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
メンテナーはふだん 1 日以内に返信
-
stringify escapes leading digits in pseudo-class arguments (:nth-child(1) becomes :nth-child(\31 ))オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 83/100
メンテナーはふだん 1 日以内に返信