ID:               19678
 Updated by:       [EMAIL PROTECTED]
 Reported By:      [EMAIL PROTECTED]
-Status:           Open
+Status:           Bogus
 Bug Type:         Output Control
 Operating System: redhat 7.3
 PHP Version:      4.2.3
 New Comment:

you just discovered http/1.1 chunked output encoding ;)

you can either switch to http/1.0 to prevent chunked
output or implement chunk decoding as required as a
'MUST' in RFC2616

see also:
http://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.6.1
http://www.w3.org/Protocols/rfc2616/rfc2616-sec19.html#sec19.4.6


Previous Comments:
------------------------------------------------------------------------

[2002-09-30 14:11:05] [EMAIL PROTECTED]

$doc = domxml_open_mem($HTTP_RAW_POST_DATA);
if (!$doc) {
  soap_fault("BAD_DATA","The content supplied was invalid");
}

$env = $doc->document_element();
$body = $env->first_child();
$nodes = $body->child_nodes();
$c = sizeof($nodes);
for($i=0;$i<$c;$i++)
{
  if ($nodes[$i]->tagname == "method") $method =
$nodes[$i]->get_content();
  if ($nodes[$i]->tagname == "argv") $argv =
$nodes[$i]->child_nodes();
}

echo "AnyData Here";
results in:
c
AnyData Here

That 'c' represents 12, the number of bytes written.
It will do this for every usage of echo, here is a more complicated
response result (can't show code cause my company won't allow that,
will try to provide another sample later)

Sample Code/Output:
-- begin code --
header("Content-Type: text/xml; charset=\"UTF-8\")");
header("Cache-control: private");
echo "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\" ?>";
echo "<SOAP-ENV:Envelope
xmlns:SOAP-ENV=\"http://schemas.xmlsoap.org/soap/envelope/\";>";
echo "<SOAP-ENV:Body>";
echo "<status>success</status>";
echo "</SOAP-ENV:Body></SOAP-ENV:Envelope>";
exit();
-- end code --
-- begin output --
d0
<?xml version="1.0" encoding="UTF-8" standalone="no"
?><SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/";><SOAP-ENV:Body><status>success</status></SOAP-ENV:Body></SOAP-ENV:Envelope>

0

-- end output --

------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=19678&edit=1

Reply via email to