On 15 October 2014 22:14:32 GMT+01:00, Ralph Schindler <ra...@ralphschindler.com> wrote: >>> I'm not sure I understand what you're trying to do, could you >explain in >>> more detail with examples? >> >> PUT /url >> Content-type: application/x-www-form-urlencoded >> >> parse_str (file_get_contents(‘php://input'), $_POST) // Ok >> >> PUT /url >> Content-type: multipart/mixed; boundary="xxxx" >> >> file_get_contents(‘php://input') // Empty string > >Here is a demonstration of this script, and a successful read of the >request body: > > $ echo 'FOOOO=BARRRRR' | http --verbose PUT localhost:8000 \ > Content-Type:'multipart/mime; boundry=xxxxx' > > PUT / HTTP/1.1 > Accept: application/json > Accept-Encoding: gzip, deflate > Content-Length: 14 > Content-Type: multipart/mime; boundry=xxxxx > Host: localhost:8000 > User-Agent: HTTPie/0.8.0
I'm not sure if itmakes a difference, but you mistyped the content type there: it should be `multipart/mixed`, not `multipart/mime`. There may also be version differences at play here, because I think the behaviour of php://input has been changed a couple of times. -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php