Feature #54600

Request arguments not available in all HTTP methods

Added by Jesper Paardekooper almost 6 years ago. Updated almost 5 years ago.

Status:
Resolved
Priority:
Could have
Category:
Http
Target version:
-
Start date:
2013-12-26
Due date:
% Done:

100%

PHP Version:
Has patch:
No
Complexity:

Description

When building a REST service that uses the PATCH method, arguments are not available because of the following restriction:

Packages/Framework/TYPO3.Flow/Classes/TYPO3/Flow/Http/Request.php

    protected function buildUnifiedArguments(array $getArguments, array $postArguments, array $uploadArguments) {
        $arguments = $getArguments;
        $contentArguments = NULL;

        if ($this->method === 'POST') {
            $contentArguments = ($postArguments !== array()) ? $postArguments : $this->decodeBodyArguments($this->getContent(), $this->headers->get('Content-Type'));
        } elseif ($this->method === 'PUT') {
            $contentArguments = $this->decodeBodyArguments($this->getContent(), $this->headers->get('Content-Type'));
        }

For proper REST support, shouldn't this also allow PATCH and perhaps some more methods that may contain arguments?


Related issues

Related to TYPO3.Flow - Feature #56916: Support PATCH request method as of RFC5789 New 2014-03-14
Related to TYPO3.Flow - Feature #45293: More flexible parsing of body arguments Resolved 2013-02-08 2013-04-13

History

#1 Updated by Bastian Waidelich over 5 years ago

  • Status changed from New to Accepted
  • Assignee set to Bastian Waidelich

#2 Updated by Adrian Föder over 5 years ago

  • Status changed from Accepted to New
  • Assignee deleted (Bastian Waidelich)
  • Priority changed from -- undefined -- to Could have

Could be obsolete anyway with https://review.typo3.org/#/c/21134/ maybe. Didn't look closely into it though.

#3 Updated by Adrian Föder over 5 years ago

  • Status changed from New to Needs Feedback
  • Assignee set to Jesper Paardekooper

#4 Updated by Bastian Waidelich over 5 years ago

Hi Jasper,

this should be fixed with https://review.typo3.org/21134 (which currently depends on the "HTTP Components"-Change, that needs some rebasing-love).
I'll try to push this forward in the next days, but maybe you could already test if the change(s) work for you..

Great talk by the way ;)

#5 Updated by Bastian Waidelich over 5 years ago

  • Assignee changed from Jesper Paardekooper to Bastian Waidelich

#6 Updated by Bastian Waidelich almost 5 years ago

  • Status changed from Needs Feedback to Resolved
  • % Done changed from 0 to 100

With the "HTTP Components" feature introduced in the recently released version 2.3 this issue has been resolved. Please re-open this ticket if there's something missing

Also available in: Atom PDF