Last modified: 2013-12-04 10:21:37 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T58307, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 56307 - Don't use 302 redirect to handle wikidata.org/entity/Q12345
Don't use 302 redirect to handle wikidata.org/entity/Q12345
Status: VERIFIED FIXED
Product: Wikimedia
Classification: Unclassified
Apache configuration (Other open bugs)
unspecified
All All
: Normal normal (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-10-29 10:31 UTC by Daniel Kinzler
Modified: 2013-12-04 10:21 UTC (History)
7 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Daniel Kinzler 2013-10-29 10:31:04 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.
Comment 1 Daniel Zahn 2013-10-31 18:26:39 UTC
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
Comment 2 Daniel Zahn 2013-10-31 19:54:21 UTC
https://gerrit.wikimedia.org/r/#/c/92925/1
Comment 3 Ariel T. Glenn 2013-11-06 09:20:36 UTC
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?
Comment 4 Daniel Kinzler 2013-11-07 14:14:51 UTC
(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.
Comment 5 Daniel Zahn 2013-11-26 23:07:00 UTC
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

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links