Last modified: 2011-08-30 22:17:37 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 T26512, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 24512 - Collection uses curl_*() functions instead of Http::*() functions
Collection uses curl_*() functions instead of Http::*() functions
Status: RESOLVED FIXED
Product: MediaWiki extensions
Classification: Unclassified
Collection (Other open bugs)
unspecified
All All
: Normal enhancement (vote)
: ---
Assigned To: Christoph Kepper
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2010-07-23 14:40 UTC by Roan Kattouw
Modified: 2011-08-30 22:17 UTC (History)
1 user (show)

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


Attachments

Description Roan Kattouw 2010-07-23 14:40:01 UTC
MediaWiki has an Http class (see includes/HttpFunctions.php) wrapping cURL which falls back to fopen() if cURL is unavailable and throwing a helpful exception if neither is available.

On the other hand Collection uses curl_*() functions directly. This doesn't allow for fallback to fopen() and doesn't display a helpful exception when cURL is unavailable but causes an opaque fatal error which has to be dug up from the error log.
Comment 1 Bugmeister Bot 2011-08-19 19:12:27 UTC
Unassigning default assignments. http://article.gmane.org/gmane.science.linguistics.wikipedia.technical/54734
Comment 2 Christoph Kepper 2011-08-24 15:25:05 UTC
The MediaWiki Http class does not support POST requests. A POST request is required to send the book to a render server. Therefor, switching to HTTP::*() is not an option. The cURL module is a requirement for the collection extension to work.

I suggest to display a prominent error message in case the cURL module is not installed.
Comment 3 Sam Reed (reedy) 2011-08-24 15:26:54 UTC
Yes it does

		$http = MWHttpRequest::factory( 'http://www.address.com',
			array(
				'method' => 'POST',
				'postData' => array(
					'foo' => 'bar',
				)
			)
		);
Comment 4 Christoph Kepper 2011-08-24 16:05:47 UTC
(In reply to comment #3)
> Yes it does
ok - my bad. Should be no problem to fix, then.
Comment 5 Christoph Kepper 2011-08-30 22:17:37 UTC
fixed in r95816

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


Navigation
Links