HydraCG / Specifications

Specifications created by the Hydra W3C Community Group
Other
139 stars 25 forks source link

Review HTTP status codes for non-existing / empty fragments #64

Closed RubenVerborgh closed 10 years ago

RubenVerborgh commented 10 years ago

The current spec says:

  1. reply with status code 200 OK if the fragment (page) with the given URL exists and is non-empty, i.e., one or more triples match the selector;
  2. reply with status code 404 Not Found if the fragment (page) with the given URL does not exist or is empty, i.e., no triples match the selector.
  3. reply with status code 404 Not Found if the selector is invalid i.e., the parameter values are not in the domain of the selector. This is the case if, for instance, a literal is used as subject.

However, it is argued that 404 might not be the best status code for all cases. 400 might be appropriate for invalid requests that will never have matches (i.e., literal as subject — case 3).

Relevant parts of the discussion:

akuckartz commented 10 years ago

Yes, and my view is that for the second case none of the 4xx codes is appropriate. An empty set of triples is equvalent to a blank HTML page which can be delivered with HTTP code 200.

RubenVerborgh commented 10 years ago

Reasons for keeping 404 for empty pages:

RubenVerborgh commented 10 years ago

Proposed resolution:

Remove all MUSTs about status codes, add that the server SHOULD return 400 for invalid triple patterns. We can then also drop the requirement for servers to respond to HEAD.

http://lists.w3.org/Archives/Public/public-hydra/2014Jul/0187.html

lanthaler commented 10 years ago

Ruben, is the idea to track the remaining normative statements about status codes and other HTTP stuff in #63 or shall we open a separate issue for this?

RubenVerborgh commented 10 years ago

I would track this in #63 indeed if that's fine.

lanthaler commented 10 years ago

Sure. We can organize it in whatever way we like.. we just need to make sure to not forget things we’ve discussed.