Skip to content
This repository has been archived by the owner on Jan 21, 2020. It is now read-only.

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

Open
AxaliaN opened this issue Feb 15, 2017 · 2 comments

Comments

@AxaliaN
Copy link

AxaliaN commented Feb 15, 2017

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.

@Wilt
Copy link
Contributor

Wilt commented Feb 20, 2017

Related to: #29

@weierophinney
Copy link
Member

This repository has been closed and moved to laminas-api-tools/api-tools-content-negotiation; a new issue has been opened at laminas-api-tools/api-tools-content-negotiation#5.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants