Skip to content

Fix parsing Link headers with unquoted rel types#15973

Merged
daxian-dbw merged 1 commit intoPowerShell:masterfrom
sliekens:patch-1
Aug 26, 2021
Merged

Fix parsing Link headers with unquoted rel types#15973
daxian-dbw merged 1 commit intoPowerShell:masterfrom
sliekens:patch-1

Conversation

@sliekens
Copy link
Copy Markdown
Contributor

PR Summary

After this commit, Invoke-RestMethod can be used with -FollowRelLink when the link relation type is not surrounded by quotes. This was previously not possible because of a defective regex pattern.

PR Context

Resolves #15972, #11629

PR Checklist

After this commit, Invoke-RestMethod can be used with -FollowRelLink when the link relation type is not surrounded by quotes. This was previously not possible because of a defective regex pattern.

Resolves PowerShell#15972, PowerShell#11629
Copy link
Copy Markdown
Collaborator

@iSazonov iSazonov left a comment

Choose a reason for hiding this comment

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

I remember I checked this previously and it worked. I must have picked the wrong site to test. :-(

@StevenLiekens Thanks for fixing this.

@iSazonov iSazonov added the CL-General Indicates that a PR should be marked as a general cmdlet change in the Change Log label Aug 23, 2021
@vexx32
Copy link
Copy Markdown
Collaborator

vexx32 commented Aug 23, 2021

Is it possible to add test cases for this pattern so we can guard against regressions?

@daxian-dbw daxian-dbw merged commit 02b532f into PowerShell:master Aug 26, 2021
@daxian-dbw
Copy link
Copy Markdown
Member

Thanks @StevenLiekens!

@iSazonov iSazonov added this to the 7.2.0-rc.1 milestone Aug 27, 2021
xtqqczze pushed a commit to xtqqczze/PowerShell-PowerShell that referenced this pull request Sep 2, 2021
@ghost
Copy link
Copy Markdown

ghost commented Dec 16, 2021

🎉v7.3.0-preview.1 has been released which incorporates this pull request.:tada:

Handy links:

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Invoke-RestMethod: Link relation type is not captured by Regex when value is not quoted

4 participants