Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PATCH method and is_conflict #1299

Open
benjamin-bergia opened this issue Jun 14, 2018 · 2 comments
Open

PATCH method and is_conflict #1299

benjamin-bergia opened this issue Jun 14, 2018 · 2 comments

Comments

@benjamin-bergia
Copy link

After working on some rest handlers for PATCH requests, I noticed that only PUT requests go through the is_conflict function and as such can return a 409.

I wasn't sure about this but, apparently, the rfc
do mention 409 and 412 as possible return codes in case of conflict.

@essen
Copy link
Member

essen commented Jun 14, 2018

Some conflicts will happen when you do the actual modification and it's up to you to return a 409 in that case, but I agree that some conflicts may be detected in is_conflict the same way as for PUT and we should probably allow it.

@essen
Copy link
Member

essen commented Nov 16, 2018

I would like to do this soon but I'm conflicted on whether this should be a 2.x change or a 3.0 change, since it'll change drastically how cowboy_rest executes when doing PATCH requests compared to the current code and documentation. But the RFC says the code and documentation is wrong, so maybe it should be treated as a bug. I dunno.

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

No branches or pull requests

2 participants