? Success
Pull Request for # 6556

User tests: Successful: Unsuccessful:

avatar PhilETaylor
PhilETaylor
23 Mar 2015

This is a fork of the original PR #6550 and closes #6556

It seems that some resful apps require CURLOPT_POST (apparently) and so code was added in #6312 to ensure CURLOPT_POST was set

However there seems to be some curl bugs with CURLOPT_PUT that doesn't send the data right unless PUT is set in CURLOPT_CUSTOMREQUEST

This PR is a compromise between #6312 and the Joomla Framework (which has no large switch and just ALWAYS sets CURLOPT_CUSTOMREQUEST)

see comments in original Issue #6556

This implements the same method of setting the method that is used in the Joomla Framework - I.e not setting the individual curl options, but just sending it with CURLOPT_CUSTOMREQUEST

To test - apply patch and test any apps using JHttp and put - probably a fringe case as Joomla doesn't actually consume this method itself as far as I can tell.

Additionally the gist here has some test cases against a test endpoint https://gist.github.com/PhilETaylor/a4ee67f8f48d3674221d

avatar PhilETaylor PhilETaylor - open - 23 Mar 2015
avatar joomla-cms-bot joomla-cms-bot - change - 23 Mar 2015
Labels Added: ?
avatar zero-24 zero-24 - change - 27 Mar 2015
Category Libraries
avatar PhilETaylor
PhilETaylor - comment - 3 Apr 2015

The reason I leave case 'PUT': in, is to stop up going through all this again when someone notices its not there, leaving it in, as part of the default block (allowed in PHP) allows us to know in the future that it has been thought about and not just forgot it...

avatar orware orware - test_item - 3 Apr 2015 - Tested successfully
avatar orware
orware - comment - 3 Apr 2015

Hi Phil,

I can confirm that this PR does fix the issue :-).


This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/6561.
avatar brianteeman brianteeman - change - 24 May 2015
Rel_Number 0 6556
Relation Type Pull Request for
avatar wilsonge wilsonge - change - 17 Jun 2015
Status Pending Closed
Closed_Date 0000-00-00 00:00:00 2015-06-17 20:30:03
Closed_By wilsonge
avatar wilsonge wilsonge - close - 17 Jun 2015
avatar wilsonge
wilsonge - comment - 17 Jun 2015

Merged - thanks Phil!

Add a Comment

Login with GitHub to post a comment