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

Add a test for patch doc with zero patch resources #57

Open
michielbdejong opened this issue May 16, 2022 · 2 comments
Open

Add a test for patch doc with zero patch resources #57

michielbdejong opened this issue May 16, 2022 · 2 comments
Assignees

Comments

@michielbdejong
Copy link
Collaborator

Thanks @edwardsph for reporting this in solid-contrib/test-suite#132 (comment)

The spec says a patch doc must at least have one patch resource. It does not say what a server should do when a client violates this requirement. A 422 response sounds good, but is it wrong for a server to respond with 200 in this case?

Is there some generic statement in the spec somewhere that explains what servers should do when clients misbehave?

@edwardsph
Copy link
Contributor

The think the spec does say how a server should respond to any invalid N3 patch:

Servers MUST respond with a 422 status code [RFC4918] if a patch document does not satisfy all of the above constraints.

See https://solidproject.org/ED/protocol#server-patch-n3-invalid

@michielbdejong
Copy link
Collaborator Author

Cool!
@mrvahedi68 can you write a test for this?

@michielbdejong michielbdejong changed the title Consider adding a test for patch doc with zero patch resources Add a test for patch doc with zero patch resources May 16, 2022
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

3 participants