powershell-universal icon indicating copy to clipboard operation
powershell-universal copied to clipboard

Misleading HTTP responses for API endpoints

Open ad-85 opened this issue 7 months ago • 0 comments

Version

4.2.21

Severity

Low

Environment

msi

Steps to Reproduce

When attempting to hit an API endpoint that does not exist OR using the incorrect method, an HTTP 401 response with an empty body is received.

Expected behavior

Wrong method -> HTTP 405 response
Nonexistent endpoint -> HTTP 404 response

Actual behavior

HTTP 401 is received in all cases

Additional Environment data

  • Windows Server 2019
  • PowerShell 7
  • Non-IIS config (Kestrel)

Screenshots/Animations

No response

ad-85 avatar Jul 03 '24 19:07 ad-85