Borked API response has HTML DB error appended in case of database lock timeout
Open, NormalPublic

Description

Author: M8R-udfkkf

Description:
I did an edit via the API, and had the API respond with the normal xml response, and the HTML version of the page was appended.

I had the following post:
format=xml&action=edit&title=Category:Book+of+Exodus+%28Bible+Illustrations+by+Sweet+Media%29&text={{en|1=Bible+illustrations+from+http:%2F%2Fwww%2Edsmedia%2Eorg%2Fresources%2Fillustrations%2Fsweet%2Dpublishing%2FExodus}}%D%A[[Category:Book+of+Exodus]]+[[Category:Media+contributed+by+the+Sweet+Publishing]]&summary=Creating+category+for+biblical+book+illustrations+[[Commons:Bots%2FRequests%2FOrophinBot+2]]&bot=1&token=3000331c2badee4aec034824cb9bb54d%2B\

And got the following reply:

<?xml version="1.0"?><api><edit result="Success" pageid="18746270" title="Category:Book of Exodus (Bible Illustrations by Sweet Media)" nochange="" /></api><!DOCTYPE html PUBLIC "-W3CDTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html lang="en" dir="ltr" class="client-nojs" xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Database error - Wikimedia Commons</title>
......

The response included the html page appended to the normal xml response.


Version: unspecified
Severity: normal
See Also:
https://bugzilla.wikimedia.org/show_bug.cgi?id=33917

Details

Reference
bz35305
bzimport raised the priority of this task from to Normal.
bzimport set Reference to bz35305.
bzimport added a subscriber: Unknown Object (MLST).
bzimport created this task.Mar 18 2012, 6:58 PM

EN.WP.ST47 wrote:

I wonder if this is the same as bug 35300, only this one is coherent?

M8R-udfkkf wrote:

One borked response

Request + Response (it's Fiddler's zip file)

Attached:

M8R-udfkkf wrote:

Another borked response

Attached:

In both of those, the html that is appended is an error page for a database lock timeout:

from within function "SiteStatsUpdate::doUpdate". Database returned error
"1205: Lock wait timeout exceeded; try restarting transaction
(10.0.6.41)".

(Fiddler files are just zip files with a particular file layout in the archive. Mime type on the attachments adjusted appropriately.)

Kind of reminds me of bug 33917.

Anomie moved this task from Unsorted to Needs Code on the MediaWiki-API board.Feb 20 2015, 3:39 PM