PHP :: Bug #41983 :: Error Fetching http headers
| Bug #41983 | Error Fetching http headers | |||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Submitted: | 2007-07-12 20:56 UTC | Modified: | 2017-03-31 14:03 UTC |
|
||||||||||
| From: | ipso at snappymail dot ca | Assigned: | dmitry (profile) | |||||||||||
| Status: | Closed | Package: | SOAP related | |||||||||||
| PHP Version: | 5.2.3 | OS: | Linux | |||||||||||
| Private report: | No | CVE-ID: | None | |||||||||||
[2007-07-12 20:56 UTC] ipso at snappymail dot ca
Description: ------------ I'm trying to use a SOAP API on an embedded device, the device is responding to the SOAP request, however PHP is saying there is an error fetching headers. Reproduce code: --------------- SOAP Request: -------------------------------------------------------------------------- POST /iWsService HTTP/1.1 Host: 192.168.1.201 Connection: Keep-Alive User-Agent: PHP-SOAP/5.2.3 Content-Type: text/xml; charset=utf-8 SOAPAction: "uri:zksoftware#GetDate" Content-Length: 494 <?xml version="1.0" encoding="UTF-8"?> <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="uri:zksoftware" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><SOAP-ENV:Body><ns1:GetDate><ArgComKey xsi:type="xsd:string">0</ArgComKey></ns1:GetDate></SOAP-ENV:Body></SOAP-ENV:Envelope> Response from SOAP Server: -------------------------------------------------------------------------- HTTP/1.0 200 OK Server: ZK Web Server Pragma: no-cache Cache-control: no-cache Content-Type: text/xml Connection: close <?xml version="1.0" encoding="iso8859-1" standalone="no"?> <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"> <SOAP-ENV:Body> <GetDateResponse> <Row Date='2006-06-24' Time='14:24:11'></Row> </GetDateResponse> </SOAP-ENV:Body> </SOAP-ENV:Envelope> However PHP returns: [faultstring] => Error Fetching http headers Expected result: ---------------- Expect PHP to parse the SOAP response properly.
Patches
Pull Requests
History
AllCommentsChangesGit/SVN commits
[2007-07-13 08:06 UTC] arrakami at gmail dot com
[2007-07-13 08:34 UTC] dmitry@php.net
[2007-07-13 15:40 UTC] ipso at snappymail dot ca
[2007-07-19 16:27 UTC] ipso at snappymail dot ca
[2007-07-21 17:20 UTC] ipso at snappymail dot ca
I had someone look into this for me, apparently the device isn't sending the "\r\n" at the end of the header, but only "\n". So instead of: if (strcmp(headerbuf, "\r\n") == 0) { Use: if (strcmp(headerbuf, "\r\n") == 0 || strcmp(headerbuf, "\n") == 0) {[2007-07-21 17:22 UTC] ipso at snappymail dot ca
[2007-07-24 09:28 UTC] dmitry@php.net
[2017-03-31 13:51 UTC] maarten dot segers at amplexor dot com
[2017-03-31 13:53 UTC] spam2 at rhsoft dot net
[2017-03-31 14:02 UTC] maarten dot segers at amplexor dot com
[2017-03-31 14:03 UTC] requinix@php.net
-Block user comment: No +Block user comment: Yes