#47649 [Com]: copying ZendDebugger settings to SoapServer causes inconsistant server results
| From: | marques at displague dot com | Date: | Fri, 13 Mar 2009 16:04:49 +0000 |
| Subject: | #47649 [Com]: copying ZendDebugger settings to SoapServer causes inconsistant server results | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-134680@lists.php.net to get a copy of this message | ||
ID: 47649
Comment by: marques at displague dot com
Reported By: marques at displague dot com
Status: Open
Bug Type: SOAP related
Operating System: linux
PHP Version: 5.2.9
New Comment:
Another interesting point about this example is that the client context
specifies http header "Accept-Encoding:". The soap client ignores that
and sends "Accept-Encoding: deflate, gzip".
Previous Comments:
------------------------------------------------------------------------
[2009-03-13 15:50:46] marques at displague dot com
Description:
------------
In an attempt to supply a SoapServer the same ZendDebugger REQUEST and
COOKIE variables used while debugging the client, the server responds
inconsistently. Sometimes the server responds with a Content-size of 0
and other times a header isn't even returned.
Reproduce code:
---------------
http://pastebin.com/f2da44cb2
Expected result:
----------------
When the ZendDebugger cookie is omitted the soap service consistently
returns the expected value. The same value should be returned when the
ZendDebugger cookie is present.
Additionally, debug and tracing options should be available to the
ZendDebugger session.
Response
Array
(
[name] => Me
)
Soap Transaction
Client
POST //soapdebug.php?s=1 HTTP/1.1
Host: localhost
Connection: Keep-Alive
User-Agent: PHP-SOAP/5.2.8
Content-Type: text/xml; charset=utf-8
SOAPAction: "http://test-uri/#getAuthor"
Content-Length: 385
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:ns1="http://test-uri/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:getAuthor/></SOAP-ENV:Body></SOAP-ENV:Envelope>
Server
HTTP/1.1 200 OK
Date: Fri, 13 Mar 2009 15:47:08 GMT
Server: Apache/2.2.11 (Ubuntu) PHP/5.2.8
X-Powered-By: PHP/5.2.8
Vary: Accept-Encoding
Content-Length: 638
Keep-Alive: timeout=15, max=100
Connection: Keep-Alive
Content-Type: text/html
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:ns1="http://test-uri/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:ns2="http://xml.apache.org/xml-soap"
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:getAuthorResponse><return
xsi:type="ns2:Map"><item><key
xsi:type="xsd:string">name</key><value
xsi:type="xsd:string">Me</value></item></return></ns1:getAuthorResponse></SOAP-ENV:Body></SOAP-ENV:Envelope>
Actual result:
--------------
The SOAP service returns nothing (not even headers) or returns no
document body but does return headers that include "Content-length: 0"
Response
Soap Transaction
Client
POST //soapdebug.php?s=1 HTTP/1.1
Host: localhost
Connection: Keep-Alive
User-Agent: PHP-SOAP/5.2.8
Content-Type: text/xml; charset=utf-8
SOAPAction: "http://test-uri/#getAuthor"
Content-Length: 385
Cookie: ZendDebuggerCookie=192.168.61.32:10000:0||004|77742D65|1152;
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:ns1="http://test-uri/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:getAuthor/></SOAP-ENV:Body></SOAP-ENV:Envelope>
Server
HTTP/1.1 200 OK
Date: Fri, 13 Mar 2009 15:45:00 GMT
Server: Apache/2.2.11 (Ubuntu) PHP/5.2.8
X-Powered-By: PHP/5.2.8
Vary: Accept-Encoding
Content-Length: 0
Keep-Alive: timeout=15, max=100
Connection: Keep-Alive
Content-Type: text/html
Here is the result on an occurrence with no headers:
SoapFault
Error Fetching http headers
#0 [internal function]: SoapClient->__doRequest('__call('getAuthor',
Array)
#2 /srv/www/test/html/soapdebug.php(57): SoapClient->getAuthor()
#3 {main}
Client
POST //soapdebug.php?s=1 HTTP/1.1
Host: localhost
Connection: Keep-Alive
User-Agent: PHP-SOAP/5.2.8
Content-Type: text/xml; charset=utf-8
SOAPAction: "http://test-uri/#getAuthor"
Content-Length: 385
Cookie: ZendDebuggerCookie=192.168.61.32:10000:0||004|77742D65|1154;
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:ns1="http://test-uri/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:getAuthor/></SOAP-ENV:Body></SOAP-ENV:Envelope>
Server
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=47649&edit=1