Skip to content

Fix PowerShell 5.1 form POST construction - #16

Closed
Regstar2 wants to merge 4 commits into
masterfrom
fix/v1.0.0-powershell51-form-post
Closed

Regstar2 wants to merge 4 commits into
masterfrom
fix/v1.0.0-powershell51-form-post

Conversation

@Regstar2

Copy link
Copy Markdown
Owner

Problem

A real Windows PowerShell 5.1 E2E build on 2026-08-23 reached the new fresh UUP conversion-package download, then failed before the HTTP request was sent:

Не удается найти перегрузку для "FormUrlEncodedContent" и количества аргументов: "5".

The Direct network path calls Invoke-WibHttpRequestCore, which built a List<KeyValuePair<string,string>> and passed it through positional New-Object Net.Http.FormUrlEncodedContent($pairs). Windows PowerShell 5.1 enumerates that list and treats the five form entries as five constructor arguments instead of one IEnumerable<KeyValuePair<string,string>> argument.

Fix

  • add a PS5.1 compatibility helper that wraps the list as a single -ArgumentList element with the unary comma;
  • override only Invoke-WibHttpRequestCore form-content construction, preserving the existing Network Policy, proxy behavior, HTTP status handling, downloads and error taxonomy;
  • load the compatibility layer immediately after the base Network.ps1 implementation;
  • add functional Pester coverage that constructs the exact five-field UUP dump POST body and reads the generated form-encoded content.

Regression coverage

tests/NetworkPowerShell51Compat.Tests.ps1 verifies:

  • the compatibility override loads after Network.ps1;
  • a five-field form body creates one System.Net.Http.FormUrlEncodedContent object instead of a five-argument constructor call;
  • all UUP dump form fields are encoded;
  • the active request core is wired to the fixed helper.

Release status

This is a second release-blocker hotfix discovered by the first real E2E run after PR #15 was merged. Keep this PR Draft until Windows self-hosted validation passes and the real ISO E2E is rerun successfully.

Copy link
Copy Markdown
Owner Author

Superseded by consolidated Draft PR #23. The PowerShell 5.1 form-POST fix and regression coverage are included there so release hardening has one review/validation surface. This PR is being closed without merge.

@Regstar2 Regstar2 closed this Aug 23, 2026
@Regstar2
Regstar2 deleted the fix/v1.0.0-powershell51-form-post branch August 26, 2026 08:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant