Last modified: 2013-09-04 11:48:17 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 T33156, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 31156 - Maxlag errors returning 200 OK, not 503 as documented
Maxlag errors returning 200 OK, not 503 as documented
Status: RESOLVED WONTFIX
Product: MediaWiki
Classification: Unclassified
API (Other open bugs)
1.17.x
All All
: Unprioritized normal (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-09-25 23:00 UTC by Jani Patokallio
Modified: 2013-09-04 11:48 UTC (History)
7 users (show)

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


Attachments

Description Jani Patokallio 2011-09-25 23:00:56 UTC
The documentation for maxlag states that any errors should be returned with a 503 HTTP response code:

http://www.mediawiki.org/wiki/Manual:Maxlag_parameter

However, on the version of MW running on the English Wikipedia (1.17wmf1), the error comes back as 200 OK instead:

$ curl -v 'http://en.wikipedia.org/w/api.php?action=query&meta=siteinfo&maxlag=-10'
* About to connect() to en.wikipedia.org port 80 (#0)
*   Trying 208.80.152.2... connected
* Connected to en.wikipedia.org (208.80.152.2) port 80 (#0)
> GET /w/api.php?action=query&meta=siteinfo&maxlag=-10 HTTP/1.1
> User-Agent: curl/7.19.7 (universal-apple-darwin10.0) libcurl/7.19.7 OpenSSL/0.9.8r zlib/1.2.3
> Host: en.wikipedia.org
> Accept: */*
> 
* HTTP 1.0, assume close after body
< HTTP/1.0 200 OK
< Date: Sun, 25 Sep 2011 22:58:35 GMT
< Server: Apache
< Cache-Control: private
< Retry-After: 5
< X-Database-Lag: 0
< MediaWiki-API-Error: maxlag

Bug or feature?  See also:

https://github.com/jpatokal/mediawiki-gateway/issues/22#issuecomment-2191496
Comment 1 Bawolff (Brian Wolff) 2011-09-26 01:04:44 UTC
I think maxlag giving 503 is only supposed to happen on the normal web interface (aka http://en.wikipedia.org/w/index.php?maxlag=-1 ) not the api (because errors are kind of handled in the api at the response level, not at the http protocol level) but I am unsure.
Comment 2 Roan Kattouw 2011-09-26 06:39:54 UTC
503s for maxlag in api.php were implemented at some point (in r52190) but reverted quickly (r53353) because of backwards compatibility concerns. See the discussion on those revisions for more background.

The manual page documents the 200 behavior now, thanks to this bug :)
Comment 3 Smallman 2012-05-21 01:32:54 UTC
Is this fixed now?

http://en.wikipedia.org/wiki/api.php?action=view&maxlag=-1

gives a 503.
Comment 4 Smallman 2012-05-21 01:36:36 UTC
Nevermind...the api still gives 200. (Above is not api request...silly me)

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


Navigation
Links