Skip to content

Change webcmdlets to default to https if a schema isn't specified for the uri#27238

Open
SteveL-MSFT wants to merge 2 commits intoPowerShell:masterfrom
SteveL-MSFT:default-https
Open

Change webcmdlets to default to https if a schema isn't specified for the uri#27238
SteveL-MSFT wants to merge 2 commits intoPowerShell:masterfrom
SteveL-MSFT:default-https

Conversation

@SteveL-MSFT
Copy link
Copy Markdown
Member

@SteveL-MSFT SteveL-MSFT commented Apr 9, 2026

PR Summary

Change URI construction to default to https instead of http if a uri is specified without the scheme

PR Context

N/A

PR Checklist

@SteveL-MSFT SteveL-MSFT requested a review from a team as a code owner April 9, 2026 18:08
Copilot AI review requested due to automatic review settings April 9, 2026 18:08
@SteveL-MSFT SteveL-MSFT added the CL-General Indicates that a PR should be marked as a general cmdlet change in the Change Log label Apr 9, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the web cmdlet URI normalization logic so that scheme-less -Uri inputs are treated as HTTPS by default, aligning default behavior with secure transport expectations in Invoke-WebRequest/Invoke-RestMethod.

Changes:

  • Changed CheckProtocol() to prepend https:// (instead of http://) when the provided Uri is not absolute.

@SteveL-MSFT SteveL-MSFT marked this pull request as draft April 9, 2026 21:35
@SteveL-MSFT SteveL-MSFT marked this pull request as ready for review April 10, 2026 01:51
@microsoft-github-policy-service microsoft-github-policy-service bot added the Review - Needed The PR is being reviewed label Apr 17, 2026
@microsoft-github-policy-service
Copy link
Copy Markdown
Contributor

This pull request has been automatically marked as Review Needed because it has been there has not been any activity for 7 days.
Maintainer, please provide feedback and/or mark it as Waiting on Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CL-General Indicates that a PR should be marked as a general cmdlet change in the Change Log Review - Needed The PR is being reviewed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants