-
Notifications
You must be signed in to change notification settings - Fork 8.1k
Closed
Labels
Resolution-FixedThe issue is fixed.The issue is fixed.WG-Cmdlets-Utilitycmdlets in the Microsoft.PowerShell.Utility modulecmdlets in the Microsoft.PowerShell.Utility module
Milestone
Description
Per RFC 8288, relation types on Link response headers MUST be compared in a case-insensitive fashion. HTTP servers SHOULD send relation types as all lower case, but parsing them MUST be case-insensitive.
Currently, the RelationLink dictionary we create is case sensitive. This should be change to case-insensitive, An HTTP server sending more than one of the same relation type (case-insensitive) is not RFC compliant, therefore a case-insensitive dictionary should not encounter keys of the same characters with different casing.
Line 1593 in 0ad9fc9
| _relationLink = new Dictionary<string, string>(); |
Steps to reproduce
$uri = 'https://api.github.com/repositories/49609581/issues?page=2'
$response = Invoke-WebRequest -Uri $Uri
$response.RelationLink.next -eq 'https://api.github.com/repositories/49609581/issues?page=3'
$response.RelationLink.Next -eq 'https://api.github.com/repositories/49609581/issues?page=3'Expected behavior
True
True
Actual behavior
True
False
Environment data
Name Value
---- -----
PSVersion 6.0.1
PSEdition Core
GitCommitId v6.0.1
OS Microsoft Windows 10.0.16299
Platform Win32NT
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0
Metadata
Metadata
Assignees
Labels
Resolution-FixedThe issue is fixed.The issue is fixed.WG-Cmdlets-Utilitycmdlets in the Microsoft.PowerShell.Utility modulecmdlets in the Microsoft.PowerShell.Utility module