[TYPO3-50-general] PUT, Automatic Argument registration and php://input

Martin Kutschker masi-no at spam-typo3.org
Thu Mar 19 20:51:26 CET 2009


Robert Lemke schrieb:
> Hi Christoph,
> 
> Am 17.03.2009 um 08:54 schrieb Christoph Blömer:
> 
>> So I found the following part in the Router class:
>>
>> F3\FLOW3\MVC\Web\Routing\Router Line 243ff:
>>            case 'PUT' :
>>                $putArguments = array();
>>                parse_str(file_get_contents("php://input"),
>> $putArguments);
>>                foreach ($putArguments as $argumentName =>
>> $argumentValue) {
>>                    echo $argumentName;
>>                    $request->setArgument($argumentName, $argumentValue);
>>                }
>>
>> My problem is if php://input is already read and I can't read it again.
>> Also the argumentName would be "Hallo_Welt" if I PUT "Hallo Welt"
>>
>> What happens when I put a bigger file content?
>> Does this make sense? What the idea behind this part?
> 
> This code is part of the MVC's REST support. However, as this is feature is
> not fully functional yet and AFAIK not in use anyway, please disable this
> part for now and use php://input for the time being.
> 
> In the long run we'll have to find a way to handle big argument files (such
> as files) and maybe provide them as a stream. We'll see.

It's nice that FLOW3 has some default handlers for requests, but there
must be a way for a custom routing that uses it's own handler.

Not only WebDAV needs to be able to read the whole request for PUT, also
SOAP requires to be able to read the whole POST request.

Masi


More information about the TYPO3-project-5_0-general mailing list