linkeddata / gold

Linked Data server for Go
150 stars 35 forks source link

Accept RDFsource and NonRDFSource in Link header #65

Open csarven opened 8 years ago

csarven commented 8 years ago

Making POST/PUT requests with: Link: <http://www.w3.org/ns/ldp#RDFSource>; rel="type" and Link: <http://www.w3.org/ns/ldp#NonRDFSource>; rel="type" should be honoured. The server defaults it to its superclass ldp:Resource - this is fine if the type is not recognized, wanted, or simply having it there by default any way, as long as the other conditions are met (IMO, that's a good thing). However, not applying the specific class makes it more difficult to distinguish between ldp:RDFSource and ldp:NonRDFSource resources - the client will have have to look at the Content-Type as a fallback.