Skip to content

Add support for multiple response headers with the same name from HttpListener #4639

@markekraus

Description

@markekraus

Multiple response header support was added in #4494 but the HttpListener concatenates multiple headers with the same name in Linux/macOS instead of returning multiple lines with the same header name.

In Windows:

HTTP/1.1 200 OK
Content-Length: 2
Content-Type: text/plain
Server: Microsoft-HTTPAPI/2.0
X-Fake-Header: testvalue01
X-Fake-Header: testvalue02
Date: Tue, 22 Aug 2017 09:49:37 GMT

In Linux/macOS:

HTTP/1.1 200 OK
X-Fake-Header: testvalue01, testvalue02
Server: Microsoft-NetCore/2.0
Date: Tue, 22 Aug 2017 09:18:18 GMT
Content-Type: text/plain
Content-Length: 2

This results in a false failure of the Verifies Invoke-WebRequest Supports Multiple response headers with same name test on Linux/macOS.

We should find a cross-platform method of returning a multiple header response. (Possibly with the new listener inf #4622)

Metadata

Metadata

Assignees

Labels

Resolution-FixedThe issue is fixed.WG-Cmdlets-Utilitycmdlets in the Microsoft.PowerShell.Utility module

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions