Last modified: 2012-11-02 21:06:19 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 T39745, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 37745 - re-asses support for action=raw
re-asses support for action=raw
Status: RESOLVED WONTFIX
Product: MediaWiki extensions
Classification: Unclassified
WikidataRepo (Other open bugs)
master
All All
: Low normal (vote)
: ---
Assigned To: Wikidata bugs
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-06-20 16:20 UTC by Daniel Kinzler
Modified: 2012-11-02 21:06 UTC (History)
4 users (show)

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


Attachments

Description Daniel Kinzler 2012-06-20 16:20:41 UTC
action=raw is current not supported for Wikibase items. The ContentHandler branch will send a 406 Not Acceptable response if action=raw is used with non-text content.

This was done after some discussion on #mediawiki, the reasoning being that
a) sending anon editable data with potentially dangerous mime types is a bad idea
b) action=raw is a legacy interface and really deprecated

action=raw could, in theory, just return a serialized version of the content, using the gen= parameter as a hint to how to serialize the content. The benefits and downsides of this should be re-assessed.
Comment 1 Brion Vibber 2012-06-22 22:25:17 UTC
action=raw's original uses are largely obsoleted by the API and ResourceLoader, so I wouldn't worry too much about adding new support for other data types.
Comment 2 Daniel Kinzler 2012-06-22 23:36:14 UTC
(In reply to comment #1)
> action=raw's original uses are largely obsoleted by the API and ResourceLoader,
> so I wouldn't worry too much about adding new support for other data types.

The thing is... i already had this implemented,. and then deliberately took it out again. But I can't recall why exactly. Security, perhaps?... Someone convinced me it was a bad idea...
Comment 3 Daniel Kinzler 2012-11-02 21:06:19 UTC
The reason why action=raw is not supported is that there is no way to report the content model to the client (The HTTP header Content-Type can be used for the serialization format, but would be inappropriate for identifying the model). Legacy clients accessing pages with action=raw will expect wikitext, but may receive something else entirely, like JSON. 

action=raw does not provide a good way to report all the meta data necessary for interpreting the data itself. So, it is disabled for anything that is not text.

Keep in mind that action=raw is a legacy interface and deprecated. Use the API instead, or SpecialExport. Both report the content model and serialization format along with the content.

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


Navigation
Links