[TYPO3-core] RFC #16011: Feature: getUrl function needs support for sending POST data

Susanne Moog typo3 at susannemoog.de
Mon Oct 25 17:26:07 CEST 2010


On 25.10.2010 13:41, Marcus Krause wrote:
> Jigal van Hemert schrieb am 10/25/2010 12:23 PM Uhr:
>> Hi,
>>
>> On 25-10-2010 11:28, Marcus Krause wrote:
>>> The committed and incomplete implementation of POST allows to send POST
>>> arguments as array(key-value-pairs) or string with joined arguments
>>> ("foo=bar").
>>
>> True, simply because cUrl supports this (plus file upload if the file
>> path/name starts with '@').
>>
>>> There's a hidden logic that sets the content-type to
>>> "multipart/form-data" when arguments are supplied as array.
>>> IMHO, this contradicts the "Principle of Least Surprise" as arguments to
>>> provide as array or string seem to be equal options.
>>
>> HTTP header 'logic' dictates this. If the arguments are sent like a GET
>> query string a different kind of content-type header is required.
> 
> No, this is done because cURL supports this kind of magic (see your
> statement on top). But it doesn't mean we (TYPO3) need to support this
> "magic".
> 
> 
> The getUrl method (with the follow-up) would be about 300 lines long.
> This is no longer maintainable.
> 
> 
> After all, because of the various reasons I've outlined in my postings,
> 
> -1 from myself
> 
> (means revert of already submitted incomplete patch) to this complete
> feature (POST for getUrl()).
> 
> I prefer a HTTP request implementation in a separate class.

Then I'll revert this and from my side would postpone the whole thing to
4.6 because I wouldn't want to refactor the whole getUrl part including
a new class for the LTS version.

Susanne


More information about the TYPO3-team-core mailing list