https://bugzilla.wikimedia.org/show_bug.cgi?id=19932


Brad Jorsch <b-jor...@northwestern.edu> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|RESOLVED                    |REOPENED
         Resolution|WORKSFORME                  |




--- Comment #3 from Brad Jorsch <b-jor...@northwestern.edu>  2009-07-27 
01:52:22 UTC ---
Using r53792 to test.

I issue the following API command:
maxlag=5&format=json&filename=Test.svg&action=upload&url=http://upload.wikimedia.org/wikipedia/commons/a/a4/Red_bug.svg&token=[...]

I get back the following response:
<br />
<b>Fatal error</b>:  Call to a member function isOK() on a non-object in
<b>/usr/local/src/MediaWiki/phase3/includes/api/ApiUpload.php</b> on line
<b>132</b><br />

After applying my patch from bug 19930, I reissue the above command and get the
expected warning response (too long to quote here, if you REALLY want it I can
attach it) with a session key. Then I issue the following API command to try to
complete the upload:
maxlag=5&format=json&filename=Test.svg&ignorewarnings=1&action=upload&sessionkey=[...]&token=[...]

I get back the following response:
{"upload":{"result":"Failure","error":"unknown-error","code":{"status":3}}}

After applying my patch from bug 19931 and re-running the queries, I get the
following slightly more helpful result:
{"upload":{"result":"Failure","error":"empty-file"}}

When I examine the session file for that request in /var/lib/php5, I observe
that it does NOT contain wsUploadData. The only keys contained are wsUserID,
wsToken, wsUserName, wsEditToken, and wsDownload.

When I apply the HttpFunctions.php part of the patch I attached to this bug and
re-run the queries again, the upload succeeds. The session file for that
request DOES, of course, contain the wsUploadData.

It seems clear that Http::update_session_progress calling session_write_close
is breaking session writing in any part of MediaWiki called after that
function. I suppose that's not "everything", but it is most certainly screwing
things up.


-- 
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.

_______________________________________________
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to