Last modified: 2013-12-04 10:21:37 UTC
Currently, www.wikidata.org/entity/Q12345 will resolve to a 302 redirect to www.wikidata.org/wiki/Special:EntityData/Q12345 (which will then trigger a 303 to a specific rendering, based on content negotiation). Instead of the 302, either of the following should be done: * Use an internal apache rewrite, with no HTTP redirect. This is the preferred solution (but for some reason caused problems when first tried). * Use a 303 ("see other") redirect instead of the 302. This is not quite as nice, but should be simple and already greatly improve the situation. Some background: /entity/Q12345 is the Linked Data interface of Wikidata, it is used as the canonical URI for a concept, which should forward to the URL of the description of the concept. A 302 redirect is semantically wrong here, and some semantic web / linked data tools complain about it.
the line in question is: 115 RewriteRule ^/entity/(.*)$ https://www.wikidata.org/wiki/Special:EntityData/$1 [R=302,QSA] in main.conf in the repo operations/apache-config as the simple solution we could just change that R=302 to R=303
https://gerrit.wikimedia.org/r/#/c/92925/1
I understood that 302 was the fallback for non-HTTP 1.1 compatible clients that won't understand 303; how is it semantically wrong for them?
(In reply to comment #3) > I understood that 302 was the fallback for non-HTTP 1.1 compatible clients > that won't understand 303; how is it semantically wrong for them? We are currently sending a 302 followed by a 303. A client that doesn't understand 303 would already be unable to that. In any case, this is for the http://www.wikidata.org/entity/ entry point - that's a URI schema explicitly designed for integration into the linked data web and geared towards clients that follow the respective rules and conventions. While it's important to support legacy clients for reading HTML pages, I really don't see the point for a linked data URI interface.
merged and deployed.. https://gerrit.wikimedia.org/r/#/c/92925/ 15:02 < mutante> !log deploying Gerrit change #92925 & 91124 (apache-config), makes /entity/ URLs on wikidata 303 and removes non-existent noncom wiki lgtm http://www.wikidata.org/entity/ * 303 See Other https://www.wikidata.org/wiki/Special:EntityData/ http://www.wikidata.org/entity/foo * 303 See Other https://www.wikidata.org/wiki/Special:EntityData/foo