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

Adding check for existing destination for COPY, MOVE, PUT and POST w/slug #368

Merged
merged 3 commits into from May 21, 2014

Conversation

escowles
Copy link
Contributor

See https://www.pivotaltracker.com/story/show/70965620 and https://www.pivotaltracker.com/story/show/71632224

  • COPY/MOVE to a resource, PUT (w/o properties) and POST (w/slug) now return 409 Conflict if the resource exists.
  • Adding ITs to check all of these.

@escowles escowles changed the title Adding check for existing destination of a MOVE, and adding IT for it Adding check for existing destination for COPY, MOVE, PUT and POST w/slug May 20, 2014
@cbeer
Copy link
Contributor

cbeer commented May 20, 2014

Is that actually the right behavior for a PUT without content? I don't necessarily have a better idea, but it strikes me as unusual.

@escowles
Copy link
Contributor Author

If there's no RDF content to update properties, and the resource already exists, then the PUT does nothing. That seems confusing to me, and possibly dangerous if the client thinks it's created a new resource but it's actually working with an existing resource.

At the very least, the return value should be different from creating a resource (201) and updating properties (204) so the client can know what happened. We could return 200 instead.

awoods pushed a commit that referenced this pull request May 21, 2014
Adding check for existing destination for COPY, MOVE, PUT and POST w/slug
@awoods awoods merged commit 8d6ca58 into master May 21, 2014
@awoods awoods deleted the move-to-existing branch May 21, 2014 00:35
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

Successfully merging this pull request may close these issues.

None yet

3 participants