Skip to content
This repository was archived by the owner on Aug 18, 2021. It is now read-only.
This repository was archived by the owner on Aug 18, 2021. It is now read-only.

LightController's Result method won't correctly handle "no content" results #220

Open
@guilhermeluizsp

Description

@guilhermeluizsp

The section about the status code 204 (no content) in RFC 7231 explicitly says that this kind of response cannot contain a message body. ASP.NET Core's Kestrel Web Server correctly validates this behavior by throwing an exception.

The method Result from LightController does not take this scenario into account and forcefully returns a DomainResponse structure:

https://github.com/Avanade/Liquid-Application-Framework/blob/94071135ae594260cdb6f6264912492a104b1420/src/Liquid.Activation/Controller/LightController.cs#L63-L87

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinggood first issueGood for newcomers

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions