Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Correct LDP Link Header
  • Loading branch information
Andrew Woods committed Feb 14, 2014
1 parent 5650d03 commit 17a0500
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
Expand Up @@ -219,7 +219,7 @@ public RdfStream describe(@PathParam("path") final List<PathSegment> pathList,
}
servletResponse.addHeader("Accept-Patch", contentTypeSPARQLUpdate);
servletResponse.addHeader("Link",
"http://www.w3.org/ns/ldp/Resource;rel=\"type\"");
"http://www.w3.org/ns/ldp#Resource;rel=\"type\"");

addResponseInformationToStream(resource, rdfStream, uriInfo,
subjects);
Expand Down
Expand Up @@ -327,6 +327,7 @@ public void testDescribeObject() throws RepositoryException {
assertEquals("Got wrong triples!", mockRdfStream.concat(mockRdfStream2),
rdfStream);
verify(mockResponse).addHeader("Accept-Patch", "application/sparql-update");
verify(mockResponse).addHeader("Link", "http://www.w3.org/ns/ldp#Resource;rel=\"type\"");

}

Expand Down
Expand Up @@ -345,7 +345,7 @@ public String apply(final Header h) {
}
});
assertTrue("Didn't find LDP link header!", links
.contains("http://www.w3.org/ns/ldp/Resource;rel=\"type\""));
.contains("http://www.w3.org/ns/ldp#Resource;rel=\"type\""));
final GraphStore results = getGraphStore(getObjMethod);
final Model model = createModelForGraph(results.getDefaultGraph());

Expand Down Expand Up @@ -398,7 +398,7 @@ public String apply(final Header h) {
return h.getValue();
}
});
assertTrue("Didn't find LDP link header!", links.contains("http://www.w3.org/ns/ldp/Resource;rel=\"type\""));
assertTrue("Didn't find LDP link header!", links.contains("http://www.w3.org/ns/ldp#Resource;rel=\"type\""));
}

@Test
Expand Down

3 comments on commit 17a0500

@ajs6f
Copy link
Contributor

@ajs6f ajs6f commented on 17a0500 Feb 17, 2014

Choose a reason for hiding this comment

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

Should we break out this URI into a lexicon constant?

@awoods
Copy link

@awoods awoods commented on 17a0500 Feb 17, 2014

Choose a reason for hiding this comment

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

Sounds reasonable... and it is already there.

@ajs6f
Copy link
Contributor

@ajs6f ajs6f commented on 17a0500 Feb 17, 2014

Choose a reason for hiding this comment

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

My speciality is making the things I say sound reasonable.

Please sign in to comment.