|
[MediaWiki-CVS] SVN: [54051] trunk/phase3/includes/HttpFunctions.php: msg#01429mediawiki-cvs
http://www.mediawiki.org/wiki/Special:Code/MediaWiki/54051 Revision: 54051 Author: brion Date: 2009-07-30 22:11:44 +0000 (Thu, 30 Jul 2009) Log Message: ----------- Allow passing postdata in Http::post() options... Note -- CURL allows you to pass an array which it will encode as multipart, but this doesn't seem to work for me. Until resolved, do URL form encoding yourself with wfArrayToCGI() and pass in a string. Todo: implement also for non-CURL mode if possible? Modified Paths: -------------- trunk/phase3/includes/HttpFunctions.php Modified: trunk/phase3/includes/HttpFunctions.php =================================================================== --- trunk/phase3/includes/HttpFunctions.php 2009-07-30 21:55:53 UTC (rev 54050) +++ trunk/phase3/includes/HttpFunctions.php 2009-07-30 22:11:44 UTC (rev 54051) @@ -287,6 +287,7 @@ $this->upload_session_key = ( isset( $opt['upload_session_key'] ) ) ? $opt['upload_session_key'] : false; $this->headers_only = ( isset( $opt['headers_only'] ) ) ? $opt['headers_only'] : false; $this->do_close_session_update = isset( $opt['do_close_session_update'] ); + $this->postData = isset( $opt['postdata'] ) ? $opt['postdata'] : ''; } /** @@ -331,7 +332,7 @@ curl_setopt( $c, CURLOPT_HEADER, true ); } elseif ( $this->method == 'POST' ) { curl_setopt( $c, CURLOPT_POST, true ); - curl_setopt( $c, CURLOPT_POSTFIELDS, '' ); + curl_setopt( $c, CURLOPT_POSTFIELDS, $this->postData ); } else { curl_setopt( $c, CURLOPT_CUSTOMREQUEST, $this->method ); } _______________________________________________ MediaWiki-CVS mailing list MediaWiki-CVS@xxxxxxxxxxxxxxxxxxx https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs
|
|
||||||||||||||||||||||||||
|
|
|
| News | Mail Home | sitemap | FAQ | advertise |