PowerShell/Polaris

204 - No content

bgelens opened this issue · 2 comments

Polaris Feature Request

Is your feature request related to a problem? Please describe

When 204 StatusCode is needed, this is not a problem. However, there is always a content-length of 1 and when checking with fiddler, I can see a symbol (0 byte?) being returned.

I need a way to have actually nothing returned but headers. This doesn't seem possible now.

$Response.StatusCode = 204

This should result in

HTTP/1.1 204 No Content
Server: Microsoft-HTTPAPI/2.0
Date: Thu, 20 Dec 2018 15:33:21 GMT

But instead results in:
image

As you can see, there is actually content returned which I did not set. Also the content type is incorrect (although I can null it). Don't mind the protocolversion header, I put that in myself.

Would be nice if we could just send nothing with only headers!

Hmmm I wonder if this is because we still send empty string back to the client.

Thanks for filing the issue!