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

405 on DELETE Memento #1990

Merged
merged 1 commit into from
May 19, 2022
Merged

405 on DELETE Memento #1990

merged 1 commit into from
May 19, 2022

Conversation

whikloj
Copy link
Collaborator

@whikloj whikloj commented May 12, 2022

JIRA Ticket: https://fedora-repository.atlassian.net/browse/FCREPO-3824

What does this Pull Request do?

Changes response on DELETE to a Memento from 409 Conflict to 405 Method Not Allowed

How should this be tested?

Before PR create an object, then create a new version, then try to delete the version. Get:

> curl -i -ufedoraAdmin:fedoraAdmin http://localhost:8080/rest/test_version/00e7d1de-1758-4cb9-8044-6a762e8c2a14/fcr:versions/20220512161636 -XDELETE

HTTP/1.1 409 Conflict
Date: Thu, 12 May 2022 16:16:57 GMT
Set-Cookie: JSESSIONID=node01soir2ymob8vom0ew3290ysd283.node0; Path=/
Expires: Thu, 01 Jan 1970 00:00:00 GMT
Set-Cookie: rememberMe=deleteMe; Path=/; Max-Age=0; Expires=Wed, 11-May-2022 16:16:57 GMT; SameSite=lax
Link: <http://localhost:8080/static/constraints/ServerManagedTypeException.rdf>; rel="http://www.w3.org/ns/ldp#constrainedBy"
Content-Type: text/plain;charset=utf-8
Content-Length: 44
Server: Jetty(9.4.34.v20201102)

Path cannot contain a fcr: prefixed segment.

Pull in the PR and try again get

> curl -i -ufedoraAdmin:fedoraAdmin http://localhost:8080/rest/test_version/00e7d1de-1758-4cb9-8044-6a762e8c2a14/fcr:versions/20220512161636 -XDELETE

HTTP/1.1 405 Method Not Allowed
Set-Cookie: JSESSIONID=node0kjxaekpsi8yxs447ffmfkmu30.node0; Path=/
Set-Cookie: rememberMe=deleteMe; Path=/; Max-Age=0; Expires=Wed, 11-May-2022 16:37:32 GMT; SameSite=lax
Content-Length: 0
Server: Jetty(9.4.44.v20210927)

That is all.

Interested parties

@fcrepo/committers

@bbpennel bbpennel self-assigned this May 19, 2022
@dbernstein dbernstein changed the base branch from main to 6.2.0-RC May 19, 2022 15:44
@dbernstein dbernstein merged commit 4d0a05b into fcrepo:6.2.0-RC May 19, 2022
@whikloj whikloj deleted the FCREPO-3824 branch July 28, 2022 19:37
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