Skip to content

ContentTypeListener checking contents of DELETE requests, but these cannot have content #5

Description

@weierophinney

Hello,

in the ContentTypeListener, in the __invoke function, checks are done for the content of a DELETE request. Per the spec, DELETE requests should not have a payload.

If I send a delete request with an application/json content-type, this will fail, because it will try to parse an empty content as JSON.

In my opinion, the DELETE should be removed from the switch statement.


Originally posted by @AxaliaN at zfcampus/zf-content-negotiation#87

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions