Page MenuHomePhabricator

HTTP response format does not obey "format" param in some error cases
Closed, ResolvedPublic

Description

Author: manos_lists

Description:
The HTML error page I got instead of JSON

Since i asked for JSON, thats what i should have got instead of the attached HTML page :-)

I suppose the API can only cover this up to somewhere and after that it's an infrastructure thing, so this may belong to the "Wikimedia" product. Anyway, the error at the bottom of the page (screenshot also attached ):

Request: GET http://en.wikipedia.org/w/api.php?format=json&list=categorymembers&action=query&cmlimit=10&cmtitle=Category:Greece&callback=SarissaAnonymous0, from 88.218.118.121 via knsq24.knams.wikimedia.org (squid/2.6.STABLE18) to ()
Error: ERR_ACCESS_DENIED, errno [No Error] at Wed, 16 Apr 2008 11:27:32 GMT


Version: unspecified
Severity: enhancement
URL: http://en.wikipedia.org/w/api.php?format=json&list=categorymembers&action=query&cmlimit=10&cmtitle=Category:Greece&callback=SarissaAnonymous0

Attached:

screnshot.png (396×1 px, 90 KB)

Details

Reference
bz13762

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 10:07 PM
bzimport set Reference to bz13762.

Hmm. It appears that this error message is output somewhere in WebStart.php or in a file included by it. That should be changed so that index.php and api.php can format the error each their own way.

Bryan.TongMinh wrote:

WONTFIX, this error is generated by the squids and not by the API. On the other hand, the fact that & gives a ERR_ACCESS_DENIED is something that is very strange.

manos_lists wrote:

Good catch on the & Bryan, thanks. Still think this maybe should be moved from the "API" to the "Wikimedia" product.

Bryan.TongMinh wrote:

Already filed as Bug 13763.

Hmmm actually it is INVALID rather than WONTFIX, not?

manos_lists wrote:

True in any case; besides being irrelevant to API, changing & to & fixed it for me.

  • This bug has been marked as a duplicate of bug 10733 ***