https://bugzilla.wikimedia.org/show_bug.cgi?id=19930
Summary: UploadFromUrl error with synchronous downloads
Product: MediaWiki
Version: 1.16-svn
Platform: All
OS/Version: All
Status: NEW
Severity: normal
Priority: Normal
Component: Uploading
AssignedTo: [email protected]
ReportedBy: [email protected]
Created an attachment (id=6386)
--> (https://bugzilla.wikimedia.org/attachment.cgi?id=6386)
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.
--
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
You are on the CC list for the bug.
_______________________________________________
Wikibugs-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l