note 114424 added to soapserver.handle

From: Date: Wed, 19 Feb 2014 14:58:58 +0000
Subject: note 114424 added to soapserver.handle
Groups: php.notes 
Request: Send a blank email to php-notes+get-198549@lists.php.net to get a copy of this message
Additional information to the comment of "Joeri Thissen" (http://www.php.net/manual/en/soapserver.handle.php#113866) In some cases the replacements generates a timeout (looks like it is in combination with Nginx). The problem is that PHP has already sent a content-length, and the webserver is still waiting for new content. To fix this you have to reset the HTTP Content-Length with the right value: <?php ob_start(); $soapServer->handle(); $result = ob_get_contents(); ob_end_clean(); $result = str_replace("abcdef", "abc", $result); $length = strlen($result); header("Content-Length: ".$length); echo $result; ---- Server IP: 72.52.91.14 Probable Submitter: 72.52.91.14 ---- Manual Page -- http://php.net/manual/en/soapserver.handle.php Edit -- https://master.php.net/note/edit/114424 Del: integrated -- https://master.php.net/note/delete/114424/integrated Del: useless -- https://master.php.net/note/delete/114424/useless Del: bad code -- https://master.php.net/note/delete/114424/bad+code Del: spam -- https://master.php.net/note/delete/114424/spam Del: non-english -- https://master.php.net/note/delete/114424/non-english Del: in docs -- https://master.php.net/note/delete/114424/in+docs Del: other reasons-- https://master.php.net/note/delete/114424 Reject -- https://master.php.net/note/reject/114424 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#198549) next »