facebook / facebook/hhvm

SoapServer handle() method doesn't work without the $soap_request argument

Open
#6,281 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
18.7k
Forks
3.1k
Avg merge
1h 47m
Merged PRs (30d)
2

Description

The docs for `public function handle ([ string $soap_request ] ): void` say that _"If this argument is omitted, the request is assumed to be in the raw POST data of the HTTP request"_. This doesn't seem to work like this under HHVM. If you omit giving the $soap_request parameter you'll get a "Bad request" response.

``` php
$server = new SoapServer(null, array(
'uri'=> 'http://www.example.com/',
'encoding'=>'UTF-8',
'soap_version' => SOAP_1_2,
));

$server->setClass('MyClass');

/* Not working */
$server->handle();

/* Working */
$server->handle(file_get_contents("php://input"));
```

See also [this Stackoverflow entry](http://stackoverflow.com/questions/28363769/soapserver-on-hhvm-throws-a-bad-request-soapfault)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.