Last modified: 2009-07-27 21:33:23 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 T21930, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 19930 - UploadFromUrl error with synchronous downloads
UploadFromUrl error with synchronous downloads
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
Uploading (Other open bugs)
1.16.x
All All
: Normal normal (vote)
: ---
Assigned To: Michael Dale
: patch
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2009-07-25 22:08 UTC by Brad Jorsch
Modified: 2009-07-27 21:33 UTC (History)
1 user (show)

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


Attachments
Patch against r53755 to fix the bugs (1.06 KB, patch)
2009-07-25 22:08 UTC, Brad Jorsch
Details

Description Brad Jorsch 2009-07-25 22:08:27 UTC
Created attachment 6386 [details]
Patch against r53755 to fix the bugs

UploadFromUrl::initialize never sets dl_mode if asynchronous mode is false. And then Http::doDownload doesn't bother to verify that it got any expected value for dl_mode (or, for that matter, whether ASYNC_DOWNLOAD was requested when it's not available). Which results in a null being returned (by falling off the end of the function) rather than the expected error object.

I've attached a patch that fixes both of these: it makes UploadFromUrl's dl_mode be set to SYNC_DOWNLOAD unless specifically set otherwise and makes Http::doDownload try synchronous download unless async is requested and available (instead of only when specifically requested). An alternate possibility for the latter would be to return a Status::newFatal at the end of the function, if you'd rather error out than try the sync download anyway.
Comment 1 Brion Vibber 2009-07-27 16:09:56 UTC
Michael, can you take a quick peek & confirm/apply this patch? Thanks!
Comment 2 Michael Dale 2009-07-27 21:33:23 UTC
patch applied ( r53825  ) makes sense to cover all the possibilities. 

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


Navigation
Links