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

Link Header pagination fails when there's no space between ';' and 'rel' #5667

Copy link
Copy link
@cruscio

Description

@cruscio
Issue body actions

If links in a Link header do not contain a space between ; and rel then invoke-webrequest fails to populate the RelationLink property

<http://localhost:8080/PowerShell?test=linkheader&maxlinks=5&linknumber=1>; rel="self"
<http://localhost:8080/PowerShell?test=linkheader&maxlinks=5&linknumber=1>;rel="self"

Not having a space is valid (more appropriate, even) per the specification: https://tools.ietf.org/html/rfc5988 page 6

For reference

#5265 [Feature] Add Multiple Link Header Support

Code

Test

It "Validate Invoke-WebRequest returns valid RelationLink property with absolute uris if Link Header is present" {

I think the appropriate fix would be to change \\s to \\s* to allow for 0 or more whitespace rather than requiring a single whitespace

Reactions are currently unavailable

Metadata

Metadata

Assignees

Labels

Issue-BugIssue has been identified as a bug in the productIssue has been identified as a bug in the productResolution-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.