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

Support 409 for PATCH requests. #312

Open
elenacanovi opened this issue May 27, 2019 · 7 comments
Open

Support 409 for PATCH requests. #312

elenacanovi opened this issue May 27, 2019 · 7 comments
Assignees

Comments

@elenacanovi
Copy link
Contributor

As per the RFC specification (https://tools.ietf.org/html/rfc5789#section-2.2), PATCH requests should be able to return 409 in the cases of conflicting state or concurrent modification (my use case btw). However, if I understand correctly the decision graph, this possibility is currently not supported by Liberator if method-patch? is true.

As a possible solution, I tried to add a new decision called patch-to-existing? to replace method-patch? in the false branch of method-delete? and moved method-patch? to the false branch of conflict?. If method-patch? is true then the path leads to patch!, otherwise it leads to method-post? from where the old behaviour is recovered.

I committed this variant to my fork here: elenacanovi@87dc3e5.

@ordnungswidrig
Copy link
Member

Thanks, that looks like a missing feature. For make this go into liberator's code base we need tests and docs, too. Please tell me if you want to have a take on it.

@elenacanovi
Copy link
Contributor Author

Yes, I would be glad to. Is it ok if I prepare a pull request with also test and docs?

@ordnungswidrig
Copy link
Member

@elenacanovi Sure! I would love that.

@casseds2
Copy link

casseds2 commented Jul 9, 2020

Hi guys, was there ever any follow up on this issue?

@elenacanovi
Copy link
Contributor Author

Not from my side, sorry. I'm currently not working on that.

@ordnungswidrig
Copy link
Member

@casseds2 I'll try to find the time to merge it. As writren above this requires updates to the documentation and tests which takes some sime.

@ordnungswidrig ordnungswidrig self-assigned this Jul 10, 2020
@casseds2
Copy link

Thank you very much Philipp! You're help is greatly appreciated 👌 🙂

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

No branches or pull requests

3 participants