From: jeff_dafoe at harte-hanks dot com Operating system: Linux PHP version: 5.2.10 PHP Bug Type: SOAP related Bug description: Option to control SoapFault HTTP Status return (Reopen of #43507)
Description: ------------ Bug #43507 describes an issue with Adobe Flex / Flash / Air where the host browser does not pass the HTTP response body down to the Flash player when the browser receives a HTTP status code of 500. The bug suggests that the ability to set the HTTP status code be allowed. The fix that was decided on instead was to look for the user agent string "Shockwave Flash". The issue with this solution is that the player's requests either never did, only do on some platforms, or no longer contain this user agent string. The player's requests contain the user agent string associated with the host browser. AIR requests (a platform where the host browser is integrated into the Flash plugin, essentially) contain the Webkit UA string. To work around this we have patched soap.c's soap_server_fault_ex to set use_http_error_status to 0. Ideally, this setting could be exposed in the SoapServer constructor's "options" or "features". Since this is a workaround for a limitation in web browser's NAPI and not a problem with the SOAP library itself, making the use_http_error_status available as an option seems like an acceptable compromise. Reproduce code: --------------- throw new SoapFault('Client', $_SERVER['HTTP_USER_AGENT']); Expected result: ---------------- HTTP/1.1 200 OK Actual result: -------------- HTTP/1.1 500 Internal Service Error -- Edit bug report at http://bugs.php.net/?id=48777&edit=1 -- Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=48777&r=trysnapshot52 Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=48777&r=trysnapshot53 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=48777&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=48777&r=fixedcvs Fixed in CVS and need be documented: http://bugs.php.net/fix.php?id=48777&r=needdocs Fixed in release: http://bugs.php.net/fix.php?id=48777&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=48777&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=48777&r=needscript Try newer version: http://bugs.php.net/fix.php?id=48777&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=48777&r=support Expected behavior: http://bugs.php.net/fix.php?id=48777&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=48777&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=48777&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=48777&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=48777&r=php4 Daylight Savings: http://bugs.php.net/fix.php?id=48777&r=dst IIS Stability: http://bugs.php.net/fix.php?id=48777&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=48777&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=48777&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=48777&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=48777&r=mysqlcfg