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 Spring-based configuration to toggle LDP strict handling of PUT requests #559

Merged
merged 1 commit into from Oct 18, 2014

Conversation

cbeer
Copy link
Contributor

@cbeer cbeer commented Oct 18, 2014

without an If-Match header

https://www.pivotaltracker.com/story/show/80950760

I'm sure this isn't the best way to do it, but we need some get some configuration from somewhere..

@@ -239,6 +243,10 @@ public Response createOrReplaceObjectRdf(
response = created(location).entity(location.toString());
}

if (httpConfiguration.putRequiresIfMatch() && StringUtils.isBlank(ifMatch) && !resource.isNew()) {
throw new ClientErrorException("An If-Match header is required", 428);
}
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For some reason the error message does not make its way to the response. My response is:

< HTTP/1.1 100 Continue
< HTTP/1.1 428 428
< Content-Length: 0
Server Jetty(8.1.11.v20130520) is not blacklisted
< Server: Jetty(8.1.11.v20130520)
HTTP error before end of send, stop sending

Anyways, the functional appears to work.

awoods pushed a commit that referenced this pull request Oct 18, 2014
Add Spring-based configuration to toggle LDP strict handling of PUT requests
@awoods awoods merged commit b028e48 into master Oct 18, 2014
@awoods awoods deleted the ldp-put-required branch October 18, 2014 01:12
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

2 participants