Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

RelationLink dictionary keys should be case-insensitive #6146

Copy link
Copy link
@markekraus

Description

@markekraus
Issue body actions

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.

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

Reactions are currently unavailable

Metadata

Metadata

Assignees

No one assigned

    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

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.