Home » Web Services » SOAP » Bug #4118
Configurable HTTP Status for Faults
Details
| Request #4118 | Configurable HTTP Status for Faults |
|---|---|
| Submitted | 2005-04-11 16:49 UTC |
| From | pear at chrisdolan dot net |
| Assigned | yunosh |
| Status | Closed |
| Package | SOAP |
| PHP Version | 4.3.7 |
| OS | linux |
| Roadmaps | (Not assigned) |
Comments
[2005-04-11 16:49 UTC] pear at chrisdolan dot net
Description:
------------
A small feature request: configurable HTTP return codes
Under SOAP_Server, SOAP faults are sent back to the client as "HTTP Status: 500 SOAP Fault". Some clients (namely Macromedia Flash) don't have access to HTTP message body when the status is something other than 200, so it's not possible to retrieve the FaultString, etc.
This is a client limitation, but a server workaround of a configurable HTTP Status code would be very helpful. Something like the (untested but simple) patch referenced below would be ideal.
Patch against PEAR-SOAP v0.81: 26 lines, 1047 bytes
http://www.chrisdolan.net/pear-soap-fault-httpcode.patch
Perl SOAP::Lite has a feature like this, which can be activated like so in server code:
$SOAP::Constants::HTTP_ON_FAULT_CODE = 200;